Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Pytest - Automation testing using python
Rating: 3.6 out of 5(10 ratings)
1,031 students

Pytest - Automation testing using python

Master Pytest for Test Automation | Complete Python Pytest Course | Pytest python
Created byShambhavi Gupta
Last updated 1/2022
English
English [Auto],

What you'll learn

  • Python Testing with test cases
  • Test execution and Reporting with Pytest framework
  • Building a easy test automation framework
  • End to End Test automation with Python Pytest
  • Writing the test cases
  • Learning about different functions in pytest

Course content

1 section22 lectures3h 50m total length
  • What is Pytest ?11:14

    Pytest is a popular Python testing framework that makes it easy to write, test, and scale tests for applications and libraries, with a rich ecosystem of plugins and extensions.

  • Features and Advantages of pytest9:59

    Discover Pytest features: no api requirement, unit and doctest execution, clear failure details, function or method syntax, plugins, including skipping tests, plus open source status for parallel testing.

  • Types of Testing(Unit Testing detail)12:00

    Explore three types of testing, focusing on unit testing—the smallest isolatable code piece—and learn how pytest, a popular open-source Python framework, simplifies writing tests with plugins.

  • How to use pytest using python ?10:34

    Learn how to use pytest with Python to create tests and run them effectively. Structure test files with underscores and implement basic Python functions to verify results.

  • Writing your first basic test and executing (practical)11:06

    Write and run your first basic pytest test in python, creating test files, following naming conventions, and executing tests to see passes and failures in a practical automation testing demo.

  • Running multiple test files at one time (practical)10:30

    Learn to run multiple pytest test files at once, manage batch executions across demo files, and interpret results from combined test cases.

  • Writing tests and executing them (practical)9:15

    Learn practical pytest testing by writing tests, importing libraries, and executing test suites to check outcomes and understand successes and failures.

  • Executing tests using sub-string(theory)9:27

    Learn how to execute tests using substring filtering in pytest, running tests across multiple files, selecting test cases, and leveraging string patterns to control test execution.

  • Executing tests using sub-string(practical)11:31

    Practice demo shows how to execute pytest tests using substring selection, build and run test cases, and verify outcomes via terminal commands.

  • Markers in pytest(theory)11:42

    Learn how Pytest markers label tests, use built-in markers and custom markers, import Pytest, and run marker-filtered tests with Pytest -m, while mapping markers to test features and attributes.

  • Markers in pytest (practical)10:48

    Explore practical markers in pytest for python automation, showing how to import pytest, declare markers, and control test execution with marked functions.

  • Fixtures in pytest(theory)11:31

    Fixtures in pytest run before each test to create data such as database connections, and tests receive that data by naming the fixture.

  • Fixtures in pytest (practical)9:47

    Learn to implement pytest fixtures in a practical, reusable way by importing fixtures, defining fixture functions, and using them across tests to manage setup and values.

  • Fixtures in pytest - 2 (practial)9:26

    Learn how to create a pytest fixture that builds a picture function and reuse it across files, importing fixtures and applying parameterized test cases.

  • parametrizing of a test10:09

    Discover how to parametrize tests in pytest to run a single test against multiple input values, using a values table to cover many use cases efficiently.

  • Parametrizing of a test (practical)11:12

    Learn to implement parametrized tests in pytest by importing pytest, using pytest.mark.parametrize to define two parameters, and asserting expected outputs for multiple input cases.

  • Skip and Xfail functions9:41

    Master pytest skip and xfail markers to selectively run or mark tests as expected failures, understand appropriate scenarios, and how execution and reporting behave.

  • Stopping the test file after n fails8:28

    Learn to stop a pytest test file after a set number of failed tests using the max speed option, with practical examples of A, B, C, and D test functions.

  • Stopping the test files (practical)9:49

    Configure Pytest to stop after a given number of failures, and observe how it halts subsequent test cases.

  • Quick practical for pytest -110:40

    Explore fixtures and assertions in this quick pytest practical. Run tests in the terminal to diagnose failures and refine functions until they pass.

  • Quick practical for pytest - 211:29

    Explore pytest fixtures and how to pass two input values to test functions. See how fixtures organize tests to reveal passing and failing cases.

  • Quick practical for pytest - 310:26

    Learn to use pytest parametrize to run a single test with multiple inputs, avoiding repetitive test functions, and define inputs and expected results for automated Python testing.

Requirements

  • Basic understanding of python programming language

Description

Pytest is a free and open-source software program that is a python-based testing framework for writing and running test programs. Even though we may use Pytest to write simple to complicated tests, i.e We can write programs to test API, database, UI, and so on, in today's world of REST services, Pytest is primarily used for API testing. It reduces the test suite’s execution time. It is incredibly simple to get started with because of its simple syntax.


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.


This course will help you master automation testing with Pytest framework. Pytest is a testing framework which allows us to write test codes using python. We can write code to test anything in any environment, like database, API, and even GUI if you want. It is a simple framework to learn, just like python.

In this course, we will be go through all topics of Python Pytest framework and it assumes that you have minimal prior experience with Python coding.

We will learn everything about Pytest that will help us build a test automation framework easily. We will cover all important aspects of pytest and also how automation is done in real test environment.


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.

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.

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!

Who this course is for:

  • Anyone who wants to learn test automation easily
  • Beginner to intermediate test developer who wants to learn Pytest for automation
  • Anyone who wants to learn Python Testing