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.
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.
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.
Let's set up Python 3 on your Windows machine, and ensure we're working with the same tools so you don't run into unnecessary hardship. NOTE: I mention PyCharm in this video, but we will be using VSCode for this course! If you have an IDE you are comfortable with, that is fine too.
In order to avoid problems, it's best if you and I are working with the same tools. I want automating to be a fun and rewarding experience, not a frustrating one!
For those of you working on Mac OS or linux, I've got you covered! We go over setting up Python 3 and your virtual environment.
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.
We may not want to run all the tests all the time. It would also be nice if we could organize our tests so that they weren't all crammed into a single folder. In this session we will discuss why test searching is so amazing, and why you should never run a test case file ever again.
Let's go over the core principles of test search...
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.
It's important to demonstrate understanding of the foundations of fixtures and some of the use cases where they are very useful
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.
How do we skip tests without forgetting we ever wrote them? How do we handle tests that are expected to fail? We cover both of these solutions in today's lecture.
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.
Learn the difference between parallelism and concurrency, and how we can leverage parallel testing to slash run-times on our test suites.
Unit Tests are performed at the lowest levels of the code, often at the level of validating the expected behavior of a single function. We will learn how to write valuable, well-scoped unit tests to expose bugs before we push our changes to the repository.
In order to set up our unit tests for primetime, it's important to separate our testing harness and cases from the library we are testing. We will use a tool called Tox to make this process fast, fluid, and repeatable.
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.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.