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!
Articles on pytest
Why Python is Great for Test Automation
By Andrew Knight on 25 July 2018
Testing in Python is consistently growing in popularity. In this article our friend Andrew Knight from Automation Panda walks through 10 reasons why Python is great for Test Automation.
PyBites Twitter Digest – Issue 21, 2018
By PyBites Team on 1 July 2018
Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.
Enough pytest to be Dangerous, 10 Things I Learned Writing Tests for 100 Python (Bites of Py) Exercises
By Bob Belderbos on 7 June 2018
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.
Twitter Digest 2018 Week 16
By PyBites Team on 29 April 2018
Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.
All You Need to Know to Start Using Fixtures in Your pytest Code
By Bob Belderbos on 15 March 2018
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.
Code Challenge 42 – Mastering Regular Expressions
By PyBites Team on 3 November 2017
Hi Pythonistas, it’s beginning of the month so we’re busy selecting some cool code challenges for you to work on to hone your Python skills. Regular Expressions was a long time coming so let’s get it out there. We hope we hit a decent intermediate level with this challenge. If you have questions ask us in the comments or join our Slack.
Code Challenge 40 – Daily Python Tip Part 1 – Make a Web App – Review
By PyBites Team on 1 November 2017
In this article we review last week’s Daily Python Tip Part 1 – Make a Web App code challenge.
Code Challenge 39 – Writing Tests With Pytest – Review
By PyBites Team on 1 November 2017
In this article we review last week’s Writing Tests With Pytest code challenge.
Code Challenge 39 – Writing Tests With Pytest
By PyBites Team on 5 October 2017
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.