Skip to content

Commit dbb08be

Browse files
committed
Added the XML Support and run tests via XML with parallel
1 parent a6bf8c4 commit dbb08be

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

ReadMe.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Setup your machine.
2222
#### Running tests
2323
``Note:`` For 2nd & 3rd steps, you need to follow this way ```OpenTerminal/CMD -> cd <change-to-project-location>```
2424
1. You can run the tests directly from the IntelliJ, by right-clicking and **Run test**.
25-
2. For Linux/Mac users: ```gradle clean build runTests```
26-
3. For Windows users: ```gradlew clean build runTests```
25+
2. For Linux/Mac users: ```gradle clean build runTests``` or ```gradle clean build test```
26+
3. For Windows users: ```gradlew clean build runTests``` or ```gradlew clean build test```
2727

2828
---
2929

Tests.xml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
2+
<suite name="Suite" parallel="classes" thread-count="5">
3+
<test name="All Chapter Tests">
4+
<classes>
5+
<class name="Chapters.Chapter01.FirstChapterTests"/>
6+
<class name="Chapters.Chapter02.SecondChapterTests"/>
7+
<class name="Chapters.Chapter03.ThirdChapterTests"/>
8+
<class name="Chapters.Chapter04.FourthChapterTests"/>
9+
<class name="Chapters.Chapter05.FifthChapterTests"/>
10+
</classes>
11+
</test>
12+
</suite>

build.gradle

+9
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,12 @@ task runTests(type: Test) {
2525
}
2626
}
2727

28+
test {
29+
useTestNG {
30+
suites 'Tests.xml'
31+
}
32+
testLogging {
33+
events 'passed', 'skipped', 'failed'
34+
}
35+
}
36+

0 commit comments

Comments
 (0)