Giter Site home page Giter Site logo

qakiran / webtau Goto Github PK

View Code? Open in Web Editor NEW

This project forked from testingisdocumenting/webtau

0.0 0.0 0.0 17.1 MB

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

Home Page: https://testingisdocumenting.org/webtau/

License: Apache License 2.0

Java 52.11% Groovy 35.69% HTML 1.46% JavaScript 8.36% CSS 2.20% Shell 0.08% Kotlin 0.08% Batchfile 0.01%

webtau's Introduction

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

webtau's People

Contributors

mykolagolubyev avatar tsiq-karold avatar tsiq-clemens avatar dependabot[bot] avatar mattmetlis avatar tsiq-nick avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.