Skip to content

chillinPanda/testng-parameter-error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

testng-parameter-error

There is a problem in testng (v.6.8.8) if you nest test suites. Parameters are overriden. This project is a little demo project to show you this problem.

Usage:

git clone https://github.com/chillinPanda/testng-parameter-error.git
cd testng-parameter-error
mvn test

Problem:

I opened a new issue in the testng project for this problem: testng-team/testng#581

Output:

ParameterErrorDemoWiki.test:12 check if we got the right parameter from  expected [www.wikipedia.org] but found [www.google.com]

Observation

Beneath you can see the testng.xml which will be run by "mvn test". The parameter "www.wikipedia.org" gets overriden by "www.google.com". If you switch the order, you will get a different test output because then "www.google.com" gets overriden.
<suite name="Demo" parallel="tests">
  <suite-files>
    
    <suite-file path="src/test/testng_xmls/testng_wiki.xml">
      <parameter name="url" value="www.wikipedia.org" />
    </suite-file>
    
    <suite-file path="src/test/testng_xmls/testng_google.xml">
      <parameter name="url" value="www.google.com" />
    </suite-file>
    
  </suite-files>
</suite>

About

Demo showing a bug in testng

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages