Elegant Automation Frameworks with Python and Pytest
- 6 hours on-demand video
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- Build high-performing, reliable automated test suites with actionable reporting
There are a lot of reasons I build most of my frameworks around Pytest, but two of the most important are that it is simple to use, and very quick to setup! In this session we will set up a simple framework around some dummy tests and explain the pytest.ini file. To view the "Setting up your Virtual Environment" video, click on the link in resources, and click "Preview this Course" where you see the preview video - this will give you access to all the free videos from my Browser Automation course, including virtual environment setup.
Fixtures are one of the most powerful tools Pytest offers. I have personally seen a fixture-based approach eliminate 80% of all code from a test suite by eliminating duplicated and copy-paste setup/teardown code. If you need to change or remove something, you do it once and you're done. Think of what you could do with all that time not spent maintaining thousands of lines of duplicated code.
A good automation framework provides on-demand, actionable information about the status of the product. Today we learn how to generate HTML reports for quick, readable summaries, but more importantly how to generate XML reports that can be read by many analysis tools.
I will demonstrate a quick reporting recipe using the open source Continuous Integration tool "Jenkins", since many students may work on teams that use Jenkins. The concept is transferable to many other tools that read XML test reports.
A good test framework is customizable, and we shouldn't be changing test code to accomodate changes. We will learn how to pass data into your test run using the command line, and write a self-building configuration file that allows testing in different environments without changing any code.
Too often I see copy and pasted test cases in cases where we want to run the same test against multiple sets of data. In this lecture we learn a recipe for testing multiple browsers without writing additional tests, and how to perform Data-driven testing using the contents of a JSON file.
Functional Tests can be at any level of the product, though for our purposes I use the term to mean any testing which occurs external to the product's code. When testing something from the "outside", it's important that we structure our tests and framework so that our intent is clear, and so that the tests are maintainable by other people.
- You should have a basic understanding of the Python programming language
Give your team on-demand, actionable insights into the status of your product with a fast, scalable test automation framework written in Python using the Pytest toolkit. Learn how to eliminate boilerplate setup and teardown code, run multiple tests at the same time, and track the history of your test runs to identify slow or problematic tests.
Learn lessons collected over years of professional automation in just a few hours.
- Never manage test suites again - let them manage themselves
- Achieve blazing fast test runs with parallel execution
- More coverage with less code
- Industry-ready test structure
A Bulletproof approach to automation fundamentals Python is one of the most popular languages in the world, and the demand for it is only increasing. Pytest is one of the most actively maintained testing frameworks in the industry, and provides an incredible set of tools for faster, less-stressful testing.
Automated testing is one of the most in-demand fields in today's tech market, but there is very little guidance on how the engineer can move from writing tests to building a robust test architecture. Reliable test frameworks save compounding amounts of time and money, improve trust between testers and developers, and make for happier testers. Happy testers are more productive, more effective, and tend to grow within the organization. Everyone wins.
The most widely circulated videos on these topics speak only to the technologies themselves, and do not offer viable implementation guidance or valuable industry practices. I have made these valuable practices the focus of this course.
Content and Overview Suitable for those comfortable with basic Python and Object-Oriented Programming concepts, these lectures build a rock-solid foundation of skills required to automate at a professional level.
Beginning with a brief introduction and a step-by-step setup of Pytest, this course allows you to watch as I walk you through each action, explaining as we go.
We will discuss what makes a good framework, and maybe more importantly, what makes a bad one. We will learn how to use test searching to avoid cumbersome test suites, and how fixtures can eliminate up to 80% of the code in a bloated codebase.
Students completing the course will have the knowledge to build high-performance, well-organized, scalable test frameworks at the professional level.
Equipped with code samples, short quizzes, and info-rich videos, you’ll have no trouble following along with the concepts, and I am always available for questions.
Finally, automating is a blast, and I wish more people did it. Let me rephrase that - I wish more people did it, and did it well! We need more people like you executing effective, high-value automation solutions, so let's get started on this journey together!
- Anyone who wants to build or improve an automated testing framework