There are advantages to using the API to tear down automated end-to-end tests

When I automate a test I create a clean starting position for each test so that the automated tests can run concurrently. “The establishment of a known-good starting position for the test before it is run, and its re-establishment at its conclusion, is vital to avoid cross-test dependencies”[1].  Re-establishing the start position of the test …

Regular expressions can help you to do more with your automated tests

   “A regular expression defines a set of one or more strings of characters” [1]. Regular expressions (regex) can be used when developing automated tests, for example, by passing a regular expression as a parameter. If you have not used a regular expression before the MDN Web docs are a good place to start learning about …

Ten reasons why you should lint your test automation code

A linter is a static analysis tool that scans source files and reports warnings and errors for the code it scans. I use a linter on the test automation code that I write. The linter tests the code I write without running the code. Here are ten reasons to use a linter on your test …

Benefit from a richer Page Object Model with abstract classes and functions

The Page Object Model we create to support our automated tests can be described as a model of the application we are testing. We can make it a richer model using abstract classes and functions. “classes, methods, and fields in TypeScript may be abstract.An abstract method or abstract field is one that hasn’t had an …

Generic functions help me to reduce the amount of Playwright test automation code

One of the challenges in writing automated tests is to have a low maintenance cost of the tests. Creating a library of functions in a Page Object Model helps because the test can reuse the functions in the library. Typescript generic functions within my Playwright Page Object Model also help me, in some situations, to …

Make your Playwright tests run faster by using the Playwright API to wait

There are times when automating a test in Playwright that the test needs to wait because the test will flake if it does not wait for something such as an event. It can be, for example, that you are waiting for a navigation to complete.  Tests can be made to wait with a ‘wait’ for …

My new guiding principles are helping me to automate tests.

It is useful to have guiding principles on how to be a good employee, teammate and tester. I work in teams that describe themselves as lean or agile and so I am interested in learning what lean and agile are. Learning about how lean and agile came about helps me understand them. John Willis has …

Use code reviews to have discussions about your test automation code

Learning from discussions originating from code reviews is helping me create a pack of automated tests using TypeScript and Playwright.  I have been developing a pack of Playwright tests with a Page Object Model. A simplified example of a page in the Page Object Model looked something like this: A simplified example of a test: …

How do you decide which tests to automate?

An end-to-end test pack needs to run quickly so that it does not slow developers, and at the same time provide useful feedback to the developers.  This makes deciding which categories of tests to include in the test pack challenging. A ten-minute video from Russ Ackoff has helped me better understand my decisions on one …

How long will that test automation take?

Sometimes testers are asked how long it will take to automate a batch of tests. Planning how long your test automation should be simple, however, the plan will have missed some requirements. There are three types of requirements[1]: “We will never understand all the requirements of a story ahead of time”[2], this applies to test …

Do Chromatic tests complement Playwright tests?

I am using Playwright to automate end-to-end tests, and have started to complement my Playwright tests with Chromatic tests.  The Playwright tests are really useful, but each test needs to run through several steps to create a scenario I want to test. Creating a Playwright test for each input variation for each part of the …

Think slowly when you are testing And Think slowly when you are automating

I am interested in how thinking slowly can help me test and I have been reading Gene Kim and Steven Spear’s new book  Wiring the Winning Organization: Liberating Our Collective Greatness Through Slowification, Simplification, and Amplification with the Deming Profound Book Club. Spear and Kim acknowledge how Daniel Kahneman, who recently passed away, influenced them …

If you are weighing up which tool to use for test automation have a look at Playwrights Trace Viewer, it may persuade you to use Playwright

When we are automating and maintaining tests we need good feedback on test runs. Playwright gives quick and useful feedback in its Trace Viewer which provides feedback on the run of tests. Trace Viewer’s feedback is one reason I like automating tests with Playwright. Through Trace Viewer you can: If a Playwright test fails, Trace …

Sometimes you need to assert that Playwright tests are not running too fast!

Tests that are automated in Playwright run fast, which is great. However, sometimes they run so fast that assertions need to be used to stop the test being flaky. Playwright uses Auto-waiting to help it run tests fast. Auto-waiting means that Playwright performs several checks before making an action, for example, it checks that an …

The Pesticide Paradox is a reason to do exploratory testing

Whichever technique is used to create tests they will contain assumptions about the nature of bugs. Each technique targets a different set of bugs. If development teams react to bug reports by fixing the bugs that have been reported and by finding and fixing similar bugs, then running the same tests is unlikely to find …

Design a site like this with WordPress.com
Get started