Testng.xml configuration file

------ Web automated testing of Webdriver + TestNG-- from zero to proficiency (Series)

  

 TestNG test cases are used to manage configuration files testng.xml, we can achieve the effect of the organization test cases, test reports output by configuring this file. Let us first explain in detail a configuration file, and then explain the output test report.

6.1 testng.xml configuration file

Testing.xml is TestNG configuration file, with powerful features, can be configured to run test cases as needed. Specific parameters are:

name

suite's name (he will appear in the test report)

junit

Whether to run junit mode

verbose

How output in the console, this setting does not affect the html version of the test report

parallel

Whether to use multi-threaded test (probably accelerated test)

configfailurepolicy

It is running after a failed attempt to continue or skip

thread-count

If you set parallel, you can set the number of threads

annotations

There 'javadoc' time to find, if not use the comments jdk5

time-out

Termination method (if parallel = "methods"), or

test (if parallel = "tests") before setting in milliseconds latency

skipfailedinvocationcounts

Whether to skip the call failed

data-provider-thread-count

Providing a range of integer thread pool in order to use parallel data

object-factory

IObjectFactory an inherited class is used to instantiate the test object

allow-return-values

If set to true, will run the test case and return value

Detailed explanation, please refer to: http://www.cnblogs.com/choosewang/articles/3079983.html , the structure and the specific value of each parameter, reference may be: http://testng.org/testng-1.0.dtd .php .

 

See original: http: //blog.sina.com.cn/s/blog_68f262210102vvfd.html

Guess you like

Origin www.cnblogs.com/peachh/p/12045794.html