Consistent Selenium Testing in Python

Posted on 01 September 2017 in Technology • Tagged with django, python, saucelabs, selenium, testing, timestrap

Back in April, I learned about Timestrap, a self-hostable, Django-based time-tracking project from a post on HackerNews by Isaac Bythewood. As I have been learning Python in the past year or so, I reached out to Isaac and started contributing to the project. After getting familiar with the core application, I turned my attention to testing and eventually found my way to Selenium, a collection of browser automation tools used for frontend testing.

I had never worked with Selenium or other automated testing products, so it struck me as a great opportunity to get my feet wet in something new. After getting things up and running, we quickly learned that the test results were quite inconsistent across development environments - even to a point that occasionally tests would succeed when run individually, but fail with the full test case.

After much trial and error, we have settled on a (mostly) consistent setup for testing with Selenium, Python and SauceLabs. This produces much better results than testing in development environments and crossing fingers during CI. Hopefully this primer will help others facing similar challenges (as we had a lot of trouble finding good material on the subject).

Continue reading

RDAP Explorer

Posted on 06 February 2017 in Technology • Tagged with django, ip, ipv4, ipv6, ipwhois, nginx, python, rdap, uwsgi, whois

Having fallen behind a bit on Takeout Inspector, the 12 Years of Gmail series and some other projects, I decided to try to put something very simple together from beginning to end and actually launch it. One of my previous posts, Examining the Remnants of a Small DDoS Attack introduced me to the Python package ipwhois and the alternative WHOIS system RDAP. This eventually led me to a quick and simple project called RDAP Explorer...

What is RDAP?

According to APNIC

The Registration Data Access Protocol (RDAP) is an alternative to WHOIS for accessing Internet resource registration data. RDAP is designed to address a number of shortcomings in the existing Whois service. The most important changes are:

  • Standardization of queries and responses
  • Internationalization considerations to cater for languages other than English in data objects
  • Redirection capabilities to allow seamless referrals to other registries

The most important advantage of RDAP over WHOIS is the Standardization of queries and responses. While reviewing a large set of IP addresses, I found it rather difficult to deal with non-standard (and sometimes nonsensical) output of WHOIS queries. Mostly they were easy enough to parse, but the odd balls made the process annoying and time consuming …

Continue reading