Writing integration and end-to-end tests take time and effort. You need to pick a tool and/or API for REST testing, pick a tool for UI, pick a tool for DB setup, CLI testing, etc. Tools come with their own setup, configs, matchers, reports (or lack thereof).
When test fails some tools provide enough context, some provide none. Often you end-up sprinkling print statements and scratch you head in what context “4 doesn’t equal 2” assertion error is.
Writing tests takes time. Often you have to run a test from start just to observe an impact of an extra test line…
One of the biggest problem with Web UI tests is their brittleness. Moving a page element around or replacing an input box with a drop down can cause a ripple effect that breaks dozens of your tests.
In this article I will show you how to encapsulate your UI implementation details so your tests can focus on testing features.
I will be using the webtau framework that has primitives designed to help with tests brittleness.
Let’s test a search feature of an imaginary app.
Test:
Webtau (short for web test automation) is a tool and API to write expressive and concise REST API tests.
Let’s start with a simple get-weather example. You have a server that returns a current temperature every time you hit /weather
end point.
I want to write a simple test to validate that a temperature I receive is lower than 100 Fahrenheit. Here is a webtau test script.
temperature.should
expression gets automatically mapped to the server response and triggers validation against temperature
value.
To run the test, executewebtau webtau-simple-get.groovy
command line.
If a command line and standalone scripts is…
In my day-to-day, I work across multiple React apps that don’t necessarily share components. They have different build systems and different technology stacks.
I wanted to find a simple tool/workflow that:
After trying tools like StoryBook and Styleguidist I decided to take a different approach and build a React component to…