Yourlabs

selenium

Djangonauts: Say no to selenium drug

| by jpic | selenium best-practice python django js
When you start applying best development practices such as TDD, you discover that you make much better software. First, you can TDD your python code with anything, django has a test runner, otherwise you have pytest and many friends. Then, you make python to interact with javascript. In the Django community, it seems that there is a conscensus around “use selenium to test your JS”. I've been like this myself for years, but the thing with selenium is that it's functional testing, not unit testing, it does bring short term ROI, but on the long term it becomes costy to maintain over time. Read More

RuntimeError: Failed to shutdown the live test server in 2 seconds. The server might be stuck or generating a slow response.

| by jpic | selenium python django travis-ci
Another problem you might run into when testing Django apps with Selenium on Travis: ====================================================================== ERROR: tearDownClass (autocomplete_light.tests.widget.WidgetTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/yourlabs/django-autocomplete-light/autocomplete_light/tests/widget.py", line 29, in tearDownClass super(WidgetTestCase, cls).tearDownClass() File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/django/test/testcases.py", line 1148, in tearDownClass cls.server_thread.join() File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/django/test/testcases.py", line 1072, in join self.httpd.shutdown() File "/home/travis/virtualenv/python2.7/local/lib/python2.7/site-packages/django/test/testcases.py", line 959, in shutdown "Failed to shutdown the live test server in 2 seconds. The " RuntimeError: Failed to shutdown the live test server in 2 seconds. Read More

Interresting Python and pip behaviour with Python 2 and 3 compatible packages

| by jpic | python selenium pip
In this article we'll explore a gotcha with Python 2 and 3 support on the long run, using Selenium as an example. Selenium is an automated testing tool enabling the tests to control a temporary browser GUI - Firefox by default. You can use it to automate functional testing. Selenium 2.37 had Python 2 and 3 support. But a little before the 2.38 release, some non-Python3-compatible code was commited. This was released in selenium 2. Read More
1 of 1