Open kvtm-monika opened 7 years ago
I haven't figured out why running the test normally from the java class is not working however running the tests from the XML files (config > single.testng.xml, right click and select run) works without issue.
This is happening because, when you are running the java class, it is unable to fetch the values from the XML file while compiling.
The parameterized test can't be run directly, you should run your TestNG XML file.
My test script runs without any issue when NOT in debug mode. As soon as I try using debug in Intellij I get the above mentioned error.
This is my xml file: <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
This is the parameters I use to run the debug: mvn clean test-compile surefire:test -Dmaven.surefire.debug -P test-visual
Any help would be greatly appreciated
Error in the method : @BeforeMethod(alwaysRun=true) @org.testng.annotations.Parameters(value={"config", "environment"}) public void setUp(String config_file, String environment) throws Exception { JSONParser parser = new JSONParser(); JSONObject config = (JSONObject) parser.parse(new FileReader("src/test/resources/conf/" + config_file)); JSONObject envs = (JSONObject) config.get("environments");