Contribute Media
A thank you to everyone who makes this possible: Read More

Beyond Unit Tests End to End Web UI Testing – Andrew Knight (PyCon Taiwan 2021)

Description

Day 1, 11:35-12:05

Abstract

Unit tests are great, but they don’t catch all bugs because they don’t test features like a user. However, Web UI tests are complicated and notoriously unreliable. So, how can we write tests well? Never fear! Let’s learn how to write robust, scalable Web UI tests using Python, pytest, and Selenium WebDriver that cover the full stack for any Web app. In this talk, we will write one simple test together that covers DuckDuckGo searching. You’ll learn how to write battle-hardened Web UI tests for any Web app, including Django and Flask apps. I’ll also provide plenty of hands-on tutorials and resources to continue learning after this talk.

Description

Web UI testing is difficult because many folks don't know how to do it, or they aren't experienced in how to handle fine details like locators or race conditions. In this talk, you will learn how to automate tests in Python using pytest and Selenium WebDriver. We will cover:

Using Selenium WebDriver like a pro Modeling Web UI interactions with page objects Writing “good” feature tests that are efficient, robust, and readable Deciding what should and should not be tested with automation Considering Playwright as a Selenium alternative The example code is here: https://github.com/AndyLPK247/tau-intro-selenium-py

I also developed courses for Test Automation University on this topic:

https://testautomationu.applitools.com/pytest-tutorial/ https://testautomationu.applitools.com/selenium-webdriver-python-tutorial/ https://testautomationu.applitools.com/web-element-locator-strategies/

Slides not uploaded by the speaker. HackMD: https://hackmd.io/@pycontw/2021/%2F%40pycontw%2Fry4OQeYMt

Speaker: Andrew Knight

Pandy Knight is the “Automation Panda” - an engineer, consultant, and international speaker who builds solutions for software testing problems. He has designed and built robust test automation projects for web apps, service APIs, and operating systems with thousands of tests running continuously. He is the lead developer for Boa Constrictor, the .NET Screenplay Pattern. He also mentors others in good development, testing, and BDD practices. Andy currently works full-time as the Lead Software Engineer in Test for PrecisionLender at Q2. Read his tech blog at AutomationPanda.com, and follow him on Twitter at @AutomationPanda.

Details

Improve this page