Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.31 KB

File metadata and controls

31 lines (21 loc) · 1.31 KB

WebTau Runner

You can use webtau http. and browser. methods as in a junit 4 tests, but to enable reporting you need to use @RunWith(WebTauRunner.class)

Groovy: :include-file: com/example/tests/junit4/CustomerCrudSingleGroovyTest.groovy {title: "CRUD test in a single method", commentsType: "inline"}
Java: :include-file: com/example/tests/junit4/CustomerCrudSingleJavaTest.java {title: "CRUD test in a single method", commentsType: "inline"}

Before/After

Use @Before, @After standard JUnit 4 annotations to implement init and cleanup logic for each test.

Groovy: :include-file: com/example/tests/junit4/CustomerCrudBeforeAfterGroovyTest.groovy {title: "CRUD test with @Before and @After annotations", commentsType: "inline"}
Java: :include-file: com/example/tests/junit4/CustomerCrudBeforeAfterJavaTest.java {title: "CRUD test with @Before and @After annotations", commentsType: "inline"}

BeforeClass/AfterClass

Use @BeforeClass and @AfterClass to prepare and cleanup resources required for multiple test methods.

Groovy: :include-file: com/example/tests/junit4/CustomerQueryGroovyTest.groovy {commentsType: "inline"}
Java: :include-file: com/example/tests/junit4/CustomerQueryJavaTest.java {commentsType: "inline"}

Maven Import

:include-file: maven/junit4-dep.xml