Webtau — web test automation

Mykola Golubyev
2 min readJan 12, 2021

--

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 you wrote. It “motivates” you to write more test lines at a time and then wondering where things went wrong and why.

Introducing you open source webtau tool, API and framework.

//java example
@WebTau
public class WeatherJavaTest {
@Test
public void checkWeather() {
http.get("/weather", (header, body) -> {
body.get("temperature").shouldBe(lessThan(100));
});
}
}
// groovy example
scenario("check weather") {
http.get("/weather") {
temperature.shouldBe < 100
}
}

Test your application across multiple layers with consistent API, matchers and rich reporting:

  • REST API
  • GraphQL API
  • Web UI
  • CLI
  • Database
  • Business Logic (JVM only)

Use one layer to re-enforce tests on another. E.g. REST API layer to set up data for Web UI test, or database layer to validate GraphQL API.

Use REPL to tighten test feedback loop and speed up test writing

webtau:000> $("ul li a")
element is found: by css ul li a
getText(): Guide
getUnderlyingValue(): Guide
count: 3

Capture test artifacts like API Responses, screenshots, command line output to automate your user facing documentation.

Report captures everything you do and everything you check:

Tests can be written in any JVM language. Language specific syntactic sugar is available for Groovy.

Head out to GitHub repo to learn more and show your support to contributors with a Star!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response