@RunWith(SerenityRunner.class)
@Narrative(text = {"As User, I would like to .. so that I should..."})
@WithTags({
@WithTag("color:red")
})
public class CompleteAnOrangeTodo {
@Test
@WithTag("color:yellow")
public void should_be_able_to_complete_a_todo() {}
@Test
@WithTag("color:blue")
public void should_see_the_number_of_todos_decrease_when_an_item_is_completed() {}
}
All of these tests have the tag “color:red”. So if you wanted to run all of the red tests, you would use:
$ mvn clean verify -Dtags="color:red"
The third test contains the tag “color:blue”, at a method level. If you wanted to run only the blue test, you would do this:
Running test with tags
All of these tests have the tag “color:red”. So if you wanted to run all of the red tests, you would use:
The third test contains the tag “color:blue”, at a method level. If you wanted to run only the blue test, you would do this:
Jacob Vu khóa học Selenium WebDriver online cho cá nhân