Skip to content

Parameters of nested test suites are overriden #581

@chillinPanda

Description

@chillinPanda

Github Demo Project with bug

I wrote a little demo project to show you this problem and that you can play and interact with it. There are also more information on the readme.md.
Check out https://github.com/chillinPanda/testng-parameter-error

Problem

If I nest two test suites into one and use parameter in the nested suite-file definition, those are overriden by following same-name-parameters. In the following example "www.wikipedia.org" will be overriden to "www.google.com" and then the tests at src/test/testng_xmls/testng_wiki.xml get a wrong parameter (the one from below)

<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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions