JUnit – Categories Test

In JUnit, you can organize the test cases into different categories, and run those categorized test cases with @Categories.ExcludeCategory or @Categories.IncludeCategory Note This @Categories annotation is available since JUnit 4.12 1. Category = Marker Interface In JUnit, you need to create marker interfaces to represent the categories: PerformanceTests.java package com.mkyong.category; //category marker interface public interface …

Read more

TestNG – Groups Test

In this tutorial, we will show you how to do the group testing in TestNG. 1. Groups on Methods Review a test group example. runSelenium() and runSelenium1() are belong to group selenium-test. testConnectOracle() and testConnectMsSQL() are belong to group database. runFinal() will be executed if groups selenium-test and database are passed. TestGroup.java package com.mkyong.testng.examples.group; import …

Read more