Click here to code!

How to Test Your Django App with Selenium and pytest

Posted by Bob on Thu 22 November 2018 in Testing • Tagged with django, pytest, selenium, platform, fixtures, dateutil • 8 min read

In this article I will show you how to test a Django app with pytest and Selenium. We will test our CodeChalleng.es platform comparing the logged out homepage vs the logged in dashboard. We will navigate the DOM matching elements and more. Overall you should learn enough Selenium and pytest to start testing a web page including a login. Sounds exciting? Let's dive straight in!


Continue reading

Enough pytest to be Dangerous, 10 Things I Learned Writing Tests for 100 Python (Bites of Py) Exercises

Posted by Bob on Thu 07 June 2018 in Testing • Tagged with pytest, learning, mock, parametrize, capfd, fixtures • 8 min read

We hit 100 Bite exercises on our Code Platform and that means we have written tests for 100 exercises. In this article I share 10 things I learned about writing test code and pytest.


Continue reading

All You Need to Know to Start Using Fixtures in Your pytest Code

Posted by Bob on Thu 15 March 2018 in Testing • Tagged with pytest, fixtures, testing, refactoring, pytest-cov, coverage • 11 min read

Setting up test cases for code that manage data can be challenging but it's an important skill to reliably test your code. You might have heard of the setup and teardown methods in unittest. In pytest you use fixtures and as you will discover in this article they are actually not that hard to set up. Fixtures have been labelled pytest's killer feature so let's explore them in this article using a practical example.


Continue reading

Code Challenge 39 - Writing Tests With Pytest - Review

Posted by PyBites on Wed 01 November 2017 in Challenges • Tagged with pytest, testing, fixtures, pytip • 1 min read

In this article we review last week's Writing Tests With Pytest code challenge.


Continue reading

Code Challenge 39 - Writing Tests With Pytest

Posted by PyBites on Thu 05 October 2017 in Challenge • Tagged with pytest, testing, unittest, fixtures, BetterCodeHub, pytest-cov, CI, opensource, Hacktoberfest, TalkPython • 2 min read

Hi Pythonistas, let's add some more challenges for October. Following our Python testing with pytest book review we let you write some tests with this awesome framework.


Continue reading

Python Testing With Pytest

Posted by Bob on Mon 25 September 2017 in Books • Tagged with pytest, testing, books, tox, Jenkins, fixtures, unittest, q&a • 3 min read

Review of Brian Okken's new pytest book.


Continue reading