I have the following in testng.xml
...
<parameter name="Empl_Name" value="Stephen" />
<test name="Employee Search test" junit="false">
    <parameter name="Valid_Empl_Name" value="${Empl_Name}" />
    <classes> 
          <class name="org.EmployeeClass" />
    </classes> 
</test>
The above is not working. My requirement is that I want to refer the Parameter Valid_Empl_Name with the above mentioned Empl_Name.
I want to reuse the Empl_Name parameter value in many of the test cases.
开发者_StackOverflowIs there any way to do this ?
This is currently not supported in TestNG but I'd be open to adding it.
Yes, its quite complex, but there is a way.  If you build your project with Maven, there is a Maven plugin called build-helper-maven-plugin  that will let you pre-process the .xml file before the build starts.
I did this in this project, but you can probably find better examples elsewhere. Maven is no longer favored over Gradle anyways; maybe you can do the same thing with Gradle (or Groovy script).
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论