Equality Comparison

When two tables are not equal, WebTau generates all the required info to investigate: Groovy def summary = loadFromCsv("summary.csv") def expected = [ "ColumnA" | "ColumnB" ] { ____________________________ 10 | greaterThan(15) anyOf(20, 22) | 40 } summary.should == expected Check matchers/import-and-dependencies Import And Dependencies for prerequisites. Java var summary = loadFromCsv("summary.csv"); TableData expected = table("ColumnA", "ColumnB", _________________________, 10, greaterThan(15), anyOf(20, 22), 40); actual(summary).should(equal(expected)); Check matchers/import-and-dependencies Import And Dependencies for prerequisites. X failed expecting [value] to equal ColumnA │ ColumnB 10 │ <greater than 15> <any of [20, 22]> │ 40: [value][1].ColumnA: actual: 30 <java.lang.Integer> expected: 20 <java.lang.Integer> actual: 30 <java.lang.Integer> expected: 22 <java.lang.Integer> (2ms) ColumnA │ ColumnB 10 │ 20 **30** │ 40

Contain

Use contain matcher to check if one map is a subset of another: Groovy def summary = loadFromCsv("summary.csv") summary.should contain(["ColumnA": 20, "ColumnB": greaterThan(15)]) Java var summary = loadFromCsv("summary.csv"); actual(summary).should(contain(map("ColumnA", 20, "ColumnB", greaterThan(15)))); X failed expecting [value] to contain {"ColumnA": 20, "ColumnB": <greater than 15>}: no match found (3ms) ColumnA │ ColumnB 10 │ 20 30 │ 40