Web UI Automation With Python for the Lazy QA

This lean course is for the lazy QA who wants to learn how to write automation code to run their web UI tests, so that they don’t have to. The goal is to focus on just the essentials to get you from point A to point B the quickest. Point A is you starting out as a purely manual tester, and by the time we’re at Point B you’ll be comfortable using a few automated tools and Python to test websites.

No prior coding experience is needed – just solid QA fundamentals and a desire to skip to the good stuff.

About This Course

My QA friend inspired me to build this course, because despite there being plenty of web automation courses and tutorials online she just needed something super streamlined to motivate her to finish. I’m sure she isn’t the only learner who feels this way. As lazy learners we just want to quickly absorb information and then put what we learned in practice straightaway.

This is what this course sets out to do. Through a short series of posts accompanied by videos and practice exercises, we’ll build out a small suite of automated tests for the https://www.demoblaze.com/ test site.

I picked Python as the programming language, because it’s popular and beginner-friendly. With Python we’ll be able to easily write automated tests leveraging powerful tools like Pytest and Playwright.1 Before we get to the coding part though, we’ll play around with a no-code tool called Selenium IDE to introduce the concept of test automation.

Prerequisites

I firmly believe that not knowing how to code is not a blocker for a tester to get involved with automation. Knowing some coding will definitely help, but I’ll cover the coding aspect of automation as if you had zero experience.

With that being said, you should be comfortable testing websites manually. To keep this course lean I’ll be jumping straight into testing fundamentals. For example, I won’t cover how to write test cases, but I might discuss how writing manual test cases differ from automated tests. Similarly, if I were discussing planning out an automation strategy, it would be helpful if you already have context around what a manual testing strategy looks like in comparison.

Syllabus

Demo Site: https://www.demoblaze.com/

Tools:

Web UI Automation With Python Series2:

  • Lesson 1: What is Test Automation and Why Do We Do It?
    • Description: In this lesson we’ll discuss manual vs. automated testing, and learn how to plan an automation initiative from the ground up.
    • Exercise: Draft an automation test plan for the demo site.
    • Goal: Get you comfortable transitioning from manual testing to automation.
  • Lesson 2: <Post title & link TBD>
    • Description: In this lesson we’ll evaluate a variety of automation tools and learn how to pick the right ones to use.
    • Exercise: Use Selenium IDE to automate a few tests.
    • Goal: Get familiar with the types of automated tools used for web UI automation.
  • Lesson 3: <Post title & link TBD>
    • Description: In this lesson we’ll learn how to read and write the most common Python statements when writing test automation code.3
    • Exercise: We will set up our codebase so that we can run our first Pytest test.
    • Goal: Get comfortable reading and writing basic Python and setting up our development environment.
  • Lesson 4: <Post title & link TBD>
    • Description: In this lesson, we’ll learn how to structure our code using the most common design pattern when it comes to UI test automation – Page Object pattern.
    • Exercise: We will build a small page library to model the demo site’s UI.
    • Goal: Be able to implement the Page Object pattern on any UI.
  • Lesson 5: <Post title & link TBD>
    • Description: In this lesson, we’ll learn about version control and shell scripting which will be useful during development.
    • Exercise: We’ll upload our codebase to GitHub and go through a typical Git workflow of pushing, merging, and pulling code.
  • Lesson 6: <Post title & link TBD>
    • Description: In this lesson, we’ll close out the series by reviewing the small test suite that we’ve built and discuss what the future lies if we want to enhance it. This will give you a glimpse of the advanced automation topics we could cover in future series.
    • Optional Exercise 1: We will build our own GitHub Actions pipeline to run our automated tests.
    • Optional Exercise 2: We will update our tests so that they can be run in parallel.

Footnotes

1If you’ve explored the world of test automation, then you may be wondering why I picked Playwright instead of say Selenium or Cypress. Well, I haven’t used Cypress and it’s JavaScript-based, so I wouldn’t be able to create the best content for beginners. Selenium, on the other hand, I do have experience with and that’s precisely why I avoided it. While it’s the most popular automation library, it’s filled with traps for beginners. Playwright will be the easier library to learn and get straight to automating tests. Once you get your feet wet with automation and want to learn the hard parts of automation that Playwright shields you from, then I definitely recommend giving Selenium a go. You’ll understand why newer tools like Playwright were built.

2This list of lessons will be update with links to their respective blog posts as I publish them. For now, consider this list “unofficial” until I wrap up the series.

3This won’t be a full tutorial on Python. I will link out to other tutorials and the Python language reference if you want to become even more familiar with the language. I encourage you to do so to become a stronger automation tester. For this course, all code samples will be provided and explained.

  • May 13, 2023