com.twosigma.webtau:webtau-junit5

webtau - web test automation. REST and UI testing framework.

License

License

Categories

Categories

JUnit Unit Testing
GroupId

GroupId

com.twosigma.webtau
ArtifactId

ArtifactId

webtau-junit5
Last Version

Last Version

1.20
Release Date

Release Date

Type

Type

jar
Description

Description

webtau - web test automation. REST and UI testing framework.

Download webtau-junit5

How to add to project

<!-- https://jarcasting.com/artifacts/com.twosigma.webtau/webtau-junit5/ -->
<dependency>
    <groupId>com.twosigma.webtau</groupId>
    <artifactId>webtau-junit5</artifactId>
    <version>1.20</version>
</dependency>
// https://jarcasting.com/artifacts/com.twosigma.webtau/webtau-junit5/
implementation 'com.twosigma.webtau:webtau-junit5:1.20'
// https://jarcasting.com/artifacts/com.twosigma.webtau/webtau-junit5/
implementation ("com.twosigma.webtau:webtau-junit5:1.20")
'com.twosigma.webtau:webtau-junit5:jar:1.20'
<dependency org="com.twosigma.webtau" name="webtau-junit5" rev="1.20">
  <artifact name="webtau-junit5" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.twosigma.webtau', module='webtau-junit5', version='1.20')
)
libraryDependencies += "com.twosigma.webtau" % "webtau-junit5" % "1.20"
[com.twosigma.webtau/webtau-junit5 "1.20"]

Dependencies

compile (3)

Group / Artifact Type Version
com.twosigma.webtau : webtau-core jar 1.20
com.twosigma.webtau : webtau-java-runner jar 1.20
org.junit.jupiter : junit-jupiter-api jar 5.5.2

test (3)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-engine jar 5.5.2
org.junit.platform : junit-platform-launcher jar 1.5.2
com.twosigma.webtau : webtau-core-groovy jar 1.20

Project Modules

There are no modules declared in this project.

webtau

Web Test Automation User Guide

logo

Simple REST tests

JUnit 4 and JUnit 5

Groovy

@RunWith(WebTauRunner.class)
class WeatherIT {
    @Test
    void checkWeather() {
        http.get("/weather") {
            temperature.shouldBe < 100
        }
    }
}

Java

@RunWith(WebTauRunner.class)
public class WeatherIT {
    @Test
    public void checkWeather() {
        http.get("/weather", (header, body) -> {
            body.get("temperature").shouldBe(lessThan(100));
        });
    }
}

JUnit5

@WebTau
class WeatherIT {
    @Test
    void checkWeather() {
        http.get("/weather") {
            temperature.shouldBe < 100
        }
    }
}

Groovy command line

Support for command line friendly automation and exploration with Groovy specific simplified runner

webtau weather.groovy
scenario("check weather") {
    http.get("/weather") {
        temperature.shouldBe < 100
    }
}
{
  "temperature": 88
}

Simple GraphQL tests

JUnit 4 and JUnit 5

Groovy

@RunWith(WebTauRunner.class)
class WeatherIT {
    @Test
    void checkWeather() {
        graphql.execute("{ weather { temperature } }") {
            weather.temperature.shouldBe < 100
        }
    }
}

Java

@RunWith(WebTauRunner.class)
public class WeatherIT {
    @Test
    public void checkWeather() {
        graphql.execute("{ weather { temperature } }", (header, body) -> {
            body.get("data.weather.temperature").shouldBe(lessThan(100));
        });
    }
}

JUnit5

@WebTau
class WeatherIT {
    @Test
    void checkWeather() {
        graphql.execute("{ weather { temperature } }") {
            weather.temperature.shouldBe < 100
        }
    }
}

Groovy command line

Support for command line friendly automation and exploration with Groovy specific simplified runner

webtau weather.groovy
scenario("check weather") {
    graphql.execute("{ weather { temperature } }") {
        weather.temperature.shouldBe < 100
    }
}

For single query requests, you may also omit the query name while validating the response:

scenario("check weather") {
    graphql.execute("{ weather { temperature } }") {
        temperature.shouldBe < 100
    }
}
{
  "data": {
    "weather": {
      "temperature": 88
    }
  }
}

Robust UI tests

scenario("search by specific query") {
    search.submit("search this")
    search.numberOfResults.should == 2
}

Precise Reporting

report-image

Full Documentation

com.twosigma.webtau

Two Sigma

Versions

Version
1.20
1.19
1.18
1.17
1.16
1.15
1.13
1.12
1.11
1.10
1.9
1.8
1.7
1.6
1.5
1.4
1.3
1.2
1.1
1.0
0.31
0.30
0.29
0.28
0.27
0.25
0.23