Video description
Learn about automated software testing with Python, BDD, Selenium WebDriver, and Postman, focusing on web applications
About This Video
- Learn automated software testing with Python
- Learn to write complete system tests using Python and tools such as Postman
In Detail
Welcome to the most comprehensive course on automated software testing with Python. Software testing is an essential skill for any developer, and this course will help you truly understand all types of test automation with Python.
The focus of this course is on testing for the web-we'll be working with REST APIs and web applications, and technologies such as unittest, Postman, and Selenium WebDriver-ranging from operations such as mocking and patching using the unit test library (to reduce dependencies and turn complex tests into simple ones) to looking at all types of testing: simple unit tests to large system tests and even customer acceptance tests.
Throughout the course we work on the Testing Pyramid concept, making sure that we have full coverage of every system component with unit tests. Then we test dependencies using integration tests. Finally, we cover the entire system using system tests. Of course, we also look at what acceptance testing is, how we come up with acceptance tests, and some of the best ways to write acceptance tests for a web application using Behavior-Driven Development and Selenium WebDriver. We also learn about implicit and explicit waits with Selenium WebDriver and Python, a key concept used to speed up the runtime of your acceptance tests. By implementing a Continuous Integration pipeline that runs your tests whenever you make any changes, you'll have much higher project quality so that you don't miss any annoying bugs. We'll look at putting our projects into GitHub and linking with them.
Who this book is for
This course is designed for students who want to test their Python applications in order to build more complete solutions, professionals keen to learn more about automated software testing in their workplace, automated software testers, and software developers.
Publisher resources
Table of contents
- Chapter 1 : Welcome
-
Chapter 2 : A Full Python Refresher
- Variables in Python
- String formatting in Python
- Getting user input
- Writing our first Python app
- Lists, tuples, and sets
- Advanced set operations
- Booleans in Python
- If statements
- The "in" keyword in Python
- If statements with the "in" keyword
- Loops in Python
- List comprehensions in Python
- Dictionaries
- Destructuring variables
- Functions in Python
- Function arguments and parameters
- Default parameter values
- Functions returning values
- Lambda functions in Python
- Dictionary comprehensions
- Unpacking arguments
- Unpacking keyword arguments
- Object-Oriented Programming in Python
- Magic methods: __str__ and __repr__
- @classmethod and @staticmethod
- Class inheritance
- Class composition
- Type hinting in Python 3.5+
- Imports in Python
- Relative imports in Python
- Errors in Python
- Custom error classes
- First-class functions
- Simple decorators in Python
- The "at" syntax for decorators
- Decorating functions with parameters
- Decorators with parameters
- Mutability in Python
- Mutable default parameters (and why they're a bad idea)
-
Chapter 3 : Your first automated software test
- Introduction to this section
- Setting up our project
- Writing our first test
- Testing dictionary equivalence
- Writing blog tests and PyCharm run configurations
- The __repr__ method, and intro to TDD
- Integration tests and finishing the blog
- Mocking, patching, and system tests
- Patching the input method and returning values
- Taking our patching further
- The last few patches!
- The TestCase setUp method
- Conclusion of this section
- Chapter 4 : Testing a Flask Endpoint
- Chapter 5 : REST API Testing, Part I
- Chapter 6 : REST API Testing, Part II
-
Chapter 7 : System testing a REST API
- Introduction to this section
- Setting project up and creating User model
- Allowing users to log in
- Writing our User tests
- The setUpClass method in the BaseTest
- Testing user registration
- Finalising user System tests
- Writing Store System tests
- Writing our Item System tests and testing authentication
- Conclusion of this section
-
Chapter 8 : System testing with Postman and Newman
- Introduction to this section
- Introduction to Postman
- Our first Posman tests
- Setting and clearing environment variables in Postman
- Running a test folder in Postman
- Advanced PyCharm run configurations
- Installing Node and Newman
- Multirun in PyCharm—Running app and tests together
- Conclusion of this section
-
Chapter 9 : Continuous Integration with Travis CI
- Introduction to this section
- Installing Git
- What is a Git repository?
- A local Git workflow
- GitHub and remote repositories
- Adding our project to GitHub
- What is Travis CI?
- Adding our repository to Travis
- The Travis config file and running tests
- Adding our test badge to the Readme
- Conclusion of this section
-
Chapter 10 : Acceptance testing and browser automation with Selenium
- Introduction to this section
- What is acceptance testing?
- Introduction to our project
- Our first acceptance test step
- Getting the Chrome webdriver
- Verifying everything works
- Finishing our first test
- Re-using steps with the regular expression matcher
- Our first content test
- Page locators and models
- The blog page
- Using pages in navigation
- Don't over-generalise tests!
- Waits and timeouts with Selenium
- Debugging acceptance tests in PyCharm
- Our final complex scenario
- Filling in forms with Selenium
- Conclusion of this section
Product information
- Title: Automated Software Testing with Python
- Author(s):
- Release date: September 2019
- Publisher(s): Packt Publishing
- ISBN: 9781839214592
You might also like
video
Elegant Automation Frameworks with Python and Pytest
Leverage pytest's fast, scalable, and professional-grade framework design to build and run automated test suites like …
book
40 Algorithms Every Programmer Should Know
Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental …
book
Automate the Boring Stuff with Python, 2nd Edition
If you’ve ever spent hours renaming files or updating hundreds of spreadsheet cells, you know how …
video
The Complete Python Course
Go from beginner to expert in Python by building projects. The best investment for your Python …