-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestng.xml
91 lines (72 loc) · 2.37 KB
/
testng.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0" encoding="UTF-8"?>
<!-- +++++++++++maven build ++++++++++++ -->
<suite name="Group of group Suite" verbose="1">
<test name="Group of group Test">
<groups>
<define name="include-group">
<include name="include-test-one" />
<include name="include-test-two" />
</define>
<define name="exclude-group">
<include name="test-one-exclude" />
<include name="test-two-exclude" />
</define>
<run>
<include name="include-group" />
<exclude name="exclude-group" />
</run>
</groups>
<classes>
<class name="com.lcj.testng.mavenBuild.RegularExpressionGroupTest" />
</classes>
</test>
</suite>
<!-- +++++++++++并行(多线程)地执行测试方法,测试类以及测试组件及 配置需要在多线程环境下运行的测试方法++++++++++++ -->
<!-- 1:每一个独立的线程分别执行各自的测试方法 -->
<!--
<suite name="Test-method Suite" parallel="methods" thread-count="2" >
<test name="Test-method test" group-by-instances="true">
<classes>
<class name="com.lcj.testng.ParallelMethodTest" />
</classes>
</test>
</suite>
-->
<!-- 2:同一个测试组件(test execution)中的各个测试类将会在独立的线程中并行地执行。-->
<!--
<suite name="Test-class Suite" parallel="classes" thread-count="2" >
<test name="Test-class test" >
<classes>
<class name="com.lcj.testng.ParallelClassesTestOne" />
<class name="com.lcj.testng.ParallelClassesTestTwo" />
</classes>
</test>
</suite>
-->
<!-- 3:如何并行地执行同一测试套件内的各个测试组件-->
<!--
<suite name="Test-class Suite" parallel="tests" thread-count="2">
<test name="Test-class test 1">
<parameter name="test-name" value="test-method One" />
<classes>
<class name="com.lcj.testng.ParallelSuiteTest" />
</classes>
</test>
<test name="Test-class test 2">
<parameter name="test-name" value="test-method Two" />
<classes>
<class name="com.lcj.testng.ParallelSuiteTest" />
</classes>
</test>
</suite>
-->
<!-- 4:配置需要在多线程环境下运行的测试方法-->
<!--
<suite name="Independent test Suite" >
<test name="Independent test">
<classes>
<class name="com.lcj.testng.IndependentTest" />
</classes>
</test>
</suite>
-->