forked from Zakaria/testNG
Grouped
This commit is contained in:
parent
1b5be610af
commit
5e08f69e84
14
.idea/inspectionProfiles/Project_Default.xml
Normal file
14
.idea/inspectionProfiles/Project_Default.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="groupsTestNG" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="groups">
|
||||||
|
<value>
|
||||||
|
<list size="1">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="Smoke" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
||||||
@ -5,28 +5,28 @@ import org.testng.annotations.Test;
|
|||||||
|
|
||||||
public class TestHomePage {
|
public class TestHomePage {
|
||||||
|
|
||||||
@Test
|
@Test(groups = { "Smoke" })
|
||||||
public static void testCaseSixteen() {
|
public static void testCaseSixteen() {
|
||||||
System.out.println("Debug the sixteenth case");
|
System.out.println("Debug the sixteenth case");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseSeventeen() {
|
public static void testCaseSeventeen() {
|
||||||
System.out.println("Debug the seventeenth case");
|
System.out.println("Debug the seventeenth case");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseEighteen() {
|
public static void testCaseEighteen() {
|
||||||
System.out.println("Debug the eighteenth case");
|
System.out.println("Debug the eighteenth case");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseNineteen() {
|
public static void testCaseNineteen() {
|
||||||
System.out.println("Debug the nineteenth case");
|
System.out.println("Debug the nineteenth case");
|
||||||
}
|
}
|
||||||
|
|
||||||
@BeforeTest
|
@BeforeTest
|
||||||
public static void testCaseTwenty() {
|
public static void testCaseTwenty() {
|
||||||
System.out.println("Debug the twentieth case ### BEFORE TEST");
|
System.out.println("Debug the twentieth case ### BEFORE TEST");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,28 +3,28 @@ package zacksolutions;
|
|||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
public class TestLoginPage {
|
public class TestLoginPage {
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseEleven() {
|
public static void testCaseEleven() {
|
||||||
System.out.println("Debug the eleventh case");
|
System.out.println("Debug the eleventh case");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(groups = { "Smoke" })
|
||||||
public static void testCaseTwelve() {
|
public static void testCaseTwelve() {
|
||||||
System.out.println("Debug the twelfth case");
|
System.out.println("Debug the twelfth case");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseThirteen() {
|
public static void testCaseThirteen() {
|
||||||
System.out.println("Debug the thirteenth case");
|
System.out.println("Debug the thirteenth case");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseFourteen() {
|
public static void testCaseFourteen() {
|
||||||
System.out.println("Debug the fourteenth case");
|
System.out.println("Debug the fourteenth case");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseFifteen() {
|
public static void testCaseFifteen() {
|
||||||
System.out.println("Debug the fifteenth case");
|
System.out.println("Debug the fifteenth case");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,27 +4,28 @@ import org.testng.annotations.AfterTest;
|
|||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
public class TestNGClass {
|
public class TestNGClass {
|
||||||
@AfterTest
|
@AfterTest
|
||||||
public static void testCaseOne(){
|
public static void testCaseOne() {
|
||||||
System.out.println("Debug the firtst case ### AFTER TEST ###");
|
System.out.println("Debug the firtst case ### AFTER TEST ###");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(groups = { "Smoke" })
|
||||||
public void testCaseTwo(){
|
public void testCaseTwo() {
|
||||||
System.out.println("Debugging the second case");
|
System.out.println("Debugging the second case");
|
||||||
}
|
}
|
||||||
@Test
|
|
||||||
public static void testCaseThree() {
|
|
||||||
System.out.println("Debug the third case");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseFour() {
|
public static void testCaseThree() {
|
||||||
System.out.println("Debug the fourth case");
|
System.out.println("Debug the third case");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseFive() {
|
public static void testCaseFour() {
|
||||||
System.out.println("Debug the fifth case");
|
System.out.println("Debug the fourth case");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public static void testCaseFive() {
|
||||||
|
System.out.println("Debug the fifth case");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,27 +3,28 @@ package zacksolutions;
|
|||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
public class TestNGDiffClass {
|
public class TestNGDiffClass {
|
||||||
@Test
|
@Test
|
||||||
public void testCaseSix(){
|
public void testCaseSix() {
|
||||||
System.out.println("Debug the sixteenth case");
|
System.out.println("Debug the sixteenth case");
|
||||||
}
|
}
|
||||||
@Test
|
|
||||||
public static void testCaseSeven() {
|
|
||||||
System.out.println("Debug the seventh case");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseEight() {
|
public static void testCaseSeven() {
|
||||||
System.out.println("Debug the eighth case");
|
System.out.println("Debug the seventh case");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseNine() {
|
public static void testCaseEight() {
|
||||||
System.out.println("Debug the ninth case");
|
System.out.println("Debug the eighth case");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public static void testCaseTen() {
|
public static void testCaseNine() {
|
||||||
System.out.println("Debug the tenth case");
|
System.out.println("Debug the ninth case");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(groups = { "Smoke" })
|
||||||
|
public static void testCaseTen() {
|
||||||
|
System.out.println("Debug the tenth case");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
21
testngGroups.xml
Normal file
21
testngGroups.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
|
||||||
|
<suite name="All Test Suite">
|
||||||
|
<test name="RegressionTest">
|
||||||
|
<groups>
|
||||||
|
<run>
|
||||||
|
<include name="Smoke"/>
|
||||||
|
</run>
|
||||||
|
</groups>
|
||||||
|
<classes>
|
||||||
|
<class name="zacksolutions.TestNGDiffClass">
|
||||||
|
</class>
|
||||||
|
<class name="zacksolutions.TestHomePage">
|
||||||
|
</class>
|
||||||
|
<class name="zacksolutions.TestNGClass">
|
||||||
|
</class>
|
||||||
|
<class name="zacksolutions.TestLoginPage">
|
||||||
|
</class>
|
||||||
|
</classes>
|
||||||
|
</test>
|
||||||
|
</suite>
|
||||||
Loading…
Reference in New Issue
Block a user