简体   繁体   中英

run parameterized and non paramterized tests sequentially in a single TestNG test suite

I have webdriver tests in different classes with some being parameterized and some non parameterized. I am having issues when running a test suite with both parameterized and non parameterized test . The paramertized test start before the non paramertized finish although I have set the parallel attribute to be false. First, I tried creating different tests in the suite with parameterized and non paramertized tests in different test but that didn't work. Secondly, I created different suite files and linked them . However, this works only when the parameterized suite is started first but not the other way round.

<suite-files>
   <suite-file path="./ParameterizedTest.xml" />
 </suite-files>

Have you try to create the non-parametrize test to different XML an group under the suite-file, example:

<suite-files>
   <suite-file path="./ParameterizedTest.xml" />
   <suite-file path="./NoNParameterizedTest.xml" />
</suite-files>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM