We may earn an affiliate commission when you visit our partners.
Course image
Brandon Blair

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.

Read more

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.

Enroll now

What's inside

Learning objective

Build high-performing, reliable automated test suites with actionable reporting

Syllabus

Introduction
Develop with Python 3 inside a Virtual Environment to avoid conflicts and unnecessary problems

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.

Read more

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.

The Pytest Framework

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.

Write good tests at all levels including Unit, Functional, Integration

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.

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Adapts a best-practices, industry-standard framework that is well-regarded and highly reliable and customizable
Develops and deploys in-demand skills in automated testing, a core skill for many in tech today
For students who want to transition from writing tests to advanced test architecture that saves time and improves quality
Develops software in Python, one of the most in-demand and popular programming languages

Save this course

Save Elegant Automation Frameworks with Python and Pytest to your list so you can find it easily later:
Save

Reviews summary

Intro to unit testing in python with pytest

According to students, this course is a good introduction to unit testing using Python and the Pytest framework. learners also mention that the instructor was easy to understand and the audio and video elements were clear.

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Elegant Automation Frameworks with Python and Pytest with these activities:
Review Course Notes and Quizzes
Enhance your understanding of the course material by reviewing your notes and quizzes, reinforcing key concepts and preparing for upcoming assessments.
Show steps
  • Review your lecture notes
  • Go through your completed quizzes
  • Identify areas where you need further clarification
Explore Python Testing Resources
Enhance your knowledge of Python testing by exploring tutorials and resources, broadening your understanding of testing techniques and best practices.
Show steps
  • Go through tutorials on Python testing frameworks
  • Review documentation on popular testing tools
  • Experiment with different testing approaches
Participate in Pytest Study Groups
Engage with fellow learners in study groups dedicated to Pytest, exchanging knowledge, discussing best practices, and troubleshooting challenges to enhance your understanding.
Browse courses on pytest
Show steps
  • Join online study groups or forums focused on Pytest
  • Participate in discussions and share your experiences
  • Collaborate on solving Pytest-related problems
Five other activities
Expand to see all activities and additional details
Show all eight activities
Explore Pytest Documentation and Tutorials
Gain a deeper understanding of Pytest's features and capabilities by actively following tutorials and exploring its documentation, enhancing your proficiency in using this testing framework.
Browse courses on pytest
Show steps
  • Go through the official Pytest documentation
  • Work through interactive tutorials on Pytest
  • Experiment with different Pytest plugins
Solve Pytest Practice Problems
Solidify your grasp of Pytest concepts by solving challenging practice problems, reinforcing your understanding of test case design and execution.
Browse courses on pytest
Show steps
  • Find online Pytest practice problems
  • Solve problems on platforms like HackerRank or LeetCode
  • Discuss solutions with peers or mentors
Develop a Test Plan for a Python Project
Apply your understanding of test planning by creating a comprehensive test plan for a Python project, ensuring thorough testing and enhancing your project's quality.
Browse courses on Software Testing
Show steps
  • Define the project's testing objectives
  • Identify the scope and boundaries of the test plan
  • Develop test cases and scenarios
  • Specify the testing environment and resources
Develop a Software Automation Framework in Python
Build a Python-based software automation framework from scratch, solidifying your understanding of test frameworks and enhancing your Python programming skills.
Show steps
  • Design the framework's architecture
  • Implement the test discovery mechanism
  • Create a reporting module
  • Test your framework on a real-world project
Write a Blog Post on Pytest Best Practices
Expand your understanding of Pytest and solidify your learning by creating a blog post on best practices, sharing your insights and reinforcing your knowledge of effective testing techniques.
Browse courses on pytest
Show steps
  • Research and gather information on Pytest best practices
  • Organize your thoughts and outline your blog post
  • Write the content, providing clear examples
  • Proofread and publish your blog post

Career center

Learners who complete Elegant Automation Frameworks with Python and Pytest will develop knowledge and skills that may be useful to these careers:
Software Development Engineer in Test
A Software Development Engineer in Test (SDET) is a software engineer who focuses on testing software applications. This role is responsible for designing, developing, and executing test plans, as well as analyzing and reporting on test results. SDETs must have a strong understanding of software development methodologies, as well as the ability to write and execute efficient test cases. The Elegant Automation Frameworks with Python and Pytest course can help SDETs build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
Quality Assurance Engineer
A Quality Assurance Engineer (QA Engineer) is responsible for ensuring that software applications meet quality standards. This role involves testing software for defects, identifying and reporting bugs, and working with developers to resolve issues. QA Engineers must have a strong understanding of software testing principles, as well as the ability to write and execute test cases. The Elegant Automation Frameworks with Python and Pytest course can help QA Engineers develop the skills they need to automate their testing processes, resulting in faster and more efficient testing.
Test Automation Engineer
A Test Automation Engineer is a software engineer who specializes in automating software testing. This role is responsible for designing, developing, and maintaining automated test scripts, as well as analyzing and reporting on test results. Test Automation Engineers must have a strong understanding of software development methodologies, as well as the ability to write and execute efficient test cases. The Elegant Automation Frameworks with Python and Pytest course can help Test Automation Engineers build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
Software Tester
A Software Tester is responsible for testing software applications for defects. This role involves manually or automatically executing test cases, identifying and reporting bugs, and working with developers to resolve issues. Software Testers must have a strong understanding of software testing principles, as well as the ability to write and execute test cases. The Elegant Automation Frameworks with Python and Pytest course can help Software Testers develop the skills they need to automate their testing processes, resulting in faster and more efficient testing.
Full-Stack Developer
A Full Stack Developer is a software engineer who works on both the front-end and back-end of software applications. This role requires a strong understanding of both web development and server-side programming. Full Stack Developers must also be able to write and execute test cases to ensure that their applications are functioning properly. The Elegant Automation Frameworks with Python and Pytest course can help Full Stack Developers build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
Web Developer
A Web Developer is responsible for designing, developing, and maintaining websites. This role requires a strong understanding of web development frameworks, as well as the ability to write and execute test cases. The Elegant Automation Frameworks with Python and Pytest course can help Web Developers build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
Data Analyst
A Data Analyst is responsible for collecting, cleaning, and analyzing data to identify trends and patterns. This role requires a strong understanding of statistics and data analysis techniques. Data Analysts must also be able to write and execute test cases to ensure that their data analysis is accurate and reliable. The Elegant Automation Frameworks with Python and Pytest course can help Data Analysts build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
Business Analyst
A Business Analyst is responsible for analyzing business processes and identifying opportunities for improvement. This role requires a strong understanding of business analysis techniques, as well as the ability to write and execute test cases. The Elegant Automation Frameworks with Python and Pytest course can help Business Analysts build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
Project Manager
A Project Manager is responsible for planning, executing, and closing projects. This role requires a strong understanding of project management methodologies, as well as the ability to write and execute test cases. The Elegant Automation Frameworks with Python and Pytest course can help Project Managers build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
Systems Analyst
A Systems Analyst is responsible for analyzing and designing computer systems. This role requires a strong understanding of systems analysis techniques, as well as the ability to write and execute test cases. The Elegant Automation Frameworks with Python and Pytest course can help Systems Analysts build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
Database Administrator
A Database Administrator is responsible for managing and maintaining databases. This role requires a strong understanding of database management systems, as well as the ability to write and execute test cases. The Elegant Automation Frameworks with Python and Pytest course can help Database Administrators build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
Network Administrator
A Network Administrator is responsible for managing and maintaining computer networks. This role requires a strong understanding of network management systems, as well as the ability to write and execute test cases. The Elegant Automation Frameworks with Python and Pytest course can help Network Administrators build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
Security Analyst
A Security Analyst is responsible for identifying and mitigating security risks. This role requires a strong understanding of security analysis techniques, as well as the ability to write and execute test cases. The Elegant Automation Frameworks with Python and Pytest course can help Security Analysts build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
IT Manager
An IT Manager is responsible for planning, implementing, and maintaining IT systems. This role requires a strong understanding of IT management principles, as well as the ability to write and execute test cases. The Elegant Automation Frameworks with Python and Pytest course can help IT Managers build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.
Software Quality Assurance Manager
A Software Quality Assurance Manager is responsible for ensuring that software applications meet quality standards. This role requires a strong understanding of software quality assurance principles, as well as the ability to write and execute test cases. The Elegant Automation Frameworks with Python and Pytest course can help Software Quality Assurance Managers build a solid foundation in test automation, enabling them to write reliable and maintainable test scripts.

Reading list

We've selected ten books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Elegant Automation Frameworks with Python and Pytest.
Provides a guide to test-driven development with Python. It covers topics such as writing tests, organizing test suites, and refactoring code.
Provides a comprehensive overview of Pytest, covering its features and how to use it effectively for testing Python code. It valuable resource for anyone looking to learn more about Pytest or improve their testing skills.
Provides a guide to deep learning with Python. It covers topics such as neural networks, convolutional neural networks, and recurrent neural networks. It valuable resource for anyone who wants to learn more about deep learning.
Provides a collection of recipes for solving common problems in Python. It covers topics such as data structures, algorithms, and web development. It valuable resource for anyone who wants to learn more about Python.
Provides a guide to machine learning with Python. It covers topics such as data preparation, model selection, and model evaluation. It valuable resource for anyone who wants to learn more about machine learning.
Provides a guide to natural language processing with Python. It covers topics such as text preprocessing, tokenization, and sentiment analysis. It valuable resource for anyone who wants to learn more about natural language processing or text mining.
Provides a guide to data analysis with Python. It covers topics such as data wrangling, data visualization, and machine learning. It valuable resource for anyone who wants to learn more about data analysis.
Provides a practical guide to automating everyday tasks with Python. It covers topics such as writing scripts, handling data, and working with the web. It valuable resource for anyone looking to learn more about Python or automation.
Provides a comprehensive guide to Python programming for beginners. It covers topics such as variables, data types, and control flow. It valuable resource for anyone who is new to Python.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Elegant Automation Frameworks with Python and Pytest.
Python Automation Testing With Pytest
Most relevant
Learn Web Automation Testing Using Selenium
Test Automation from scratch. Selenium IDE (SideeX).
Selenium WebDriver with Java & Cucumber BDD
Automation Testing using Selenium & Katalon Studio
Groovy Fundamentals For Testers - Step By Step
Selenium WebDriver 4, Cucumber BDD, Java & More!
Automating Networks with Python
Web Automation-Selenium-Ruby|E-2-E Cucumber integration...
Our mission

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.

Affiliate disclosure

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.

© 2016 - 2024 OpenCourser