WebTau simplifies writing REST/GraphQL/Browser/DB/CLI tests. On top of that if the logic behind those layers is written in JVM based language, WebTau also simplifies testing logic behind those layers directly.WebTau makes tests to be focused on input and output by reducing boilerplate.
Simplified Input Preparation
Groovy @Test void "diversified teams should have various levels and time at company"() { def employeeData = [ "id" | "level" | "monthsAtCompany"] { _______________________________________ "bob" | 2 | 12 "smith" | 4 | 34 "john" | 3 | 20 } def diversified = peopleManagement.diversityLevel(employees(employeeData)) diversified.should == true } Java @Test public void diversifiedTeamsShouldHaveVariousLevelsAndTimeAtCompany() { TableData employeeData = table( "id", "level", "monthsAtCompany").values( "bob", 2, 12, "smith", 4, 34, "john", 3, 20); boolean diversified = peopleManagement.diversityLevel(employees(employeeData)); actual(diversified).should(equal(true)); }
Simplified Output Validation
Complex data and assertions are first class citizens. Groovy @Test void "provides access to new joiners"() { TableData allEmployees = ["id" | "level" | "monthsAtCompany"] { ______________________________________ "alice" | 5 | 1 "bob" | 3 | 0 "smith" | 4 | 1 "cat" | 4 | 0 } addEmployees(allEmployees) dao.thisWeekJoiners().should == ["id" | "level" | "monthsAtCompany"] { ______________________________________ "bob" | 3 | 0 "cat" | 4 | 0 } } Java @Test public void providesAccessToNewJoiners() { TableData allEmployees = table( "id", "level", "monthsAtCompany", ____________________________________, "alice", 5, 1, "bob", 3, 0, "smith", 4, 1, "cat", 4, 0); addEmployees(allEmployees); actual(dao.thisWeekJoiners()).should(equal(table( "*id", "level", "monthsAtCompany", ____________________________________, "bob", 3, 0, "cat", 4, 0))); } Note: The examples above assumes import static org.testingisdocumenting.webtau.WebTauCore.* or import static org.testingisdocumenting.webtau.WebTauDsl.* . For more TableData features, check reference/table-data reference page