Open jedrzej-andrykowski opened 9 years ago
I don't know how you expect it should work, but neither <parmeters>
nor <parameters>
are supported by TestNG.
http://xml.silmaril.ie/includes.html shows that it should be possible to do what you want, but as @juherr said you should remove the <parmeters>
tag because that is not correct testng markup.
You need to mention the module: moduleName/src/main/resources/childXML/base.xml or absolute uri:
<!ENTITY parent SYSTEM "file:///C:/any_folders_to_your_project/module/selenium-tests/src/test/resources/childXML/base.xml">
3 / in the uri is not a mistake!
Now should work
Hello,
I have xml with some parameters (childXML/base.xml):
and I want to use these parameters in some suite xml (testng.xml):
I use Eclipse Luna with TestNG plugin. I added testng.xml to the Windows -> Preferences -> TestNG -> Template XML File. When I run tests by TestNG Suite (right click on the testng.xml - > Run as -> TestNG Suite) everything works well. Problem appears when I try to run test by TestNG Test (right click on the project or test class -> Run as -> TestNG Test). I got this error:
java.io.FileNotFoundException: C:\eclipse\src\main\resources\childXML\base.xml
It seems that problem is in the relative path:
I try with other combinations childXML/base.xml, ./childXML/base.xml, but it doesn't work. Maybe I doing something wrong, but I think it is a problem with TestNG or with the plugin.
Thank you in advance