Settings File Not Available (Atu reporter)

429 Views Asked by At

I am trying to do some tests, at my project, but this exception stops my work. I just refactor the name of 2 classes, and after that appears this exception.

This is my exception:

java.lang.IllegalStateException: [ATU Custom Reporter Exception] Settings File Not Available at atu.testng.reports.listeners.ATUReportsListener.onStart(Unknown Source) at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:301) at org.testng.SuiteRunner.run(SuiteRunner.java:362) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208) at org.testng.TestNG.runSuitesLocally(TestNG.java:1137) at org.testng.TestNG.runSuites(TestNG.java:1049) at org.testng.TestNG.run(TestNG.java:1017) at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:73) at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123) Caused by: [ATU Custom Reporter Exception] Settings File Not Available at atu.testng.reports.utils.SettingsFile.open(Unknown Source) at atu.testng.reports.utils.SettingsFile.get(Unknown Source) at atu.testng.reports.utils.SettingsFile.correctErrors(Unknown Source) ... 11 more

2

There are 2 best solutions below

0
Alexey R. On BEST ANSWER

Here atu.testng.reports.utils.SettingsFile.open() the code is trying to open a file with some "settings". I guess your refactoring caused renaming of that file or some string holding the path to that file as well (refactoring can not just rename your classes but change the inner text of strings if you are not careful enough).

So my advice would be to check what path is propagated to that method and from where and check if the path is really correct.

0
Zaxxon On

I, too, refactored my code recently, and I am getting this same issue.

    System.out.println("atu.reporter.config: \"" + propFile + "\"");
    System.setProperty("atu.reporter.config", propFile);

So I print out the file path of the file, and I can open it with notepad. And it is only a single line or so.

If I open it with VIM or within Git Bash, I see multiple lines and that the end line character is "\n" as in UNIX, whereas DOS/Windows uses "\r\n" character string.

Switching between UNIX and DOS/Windows end of the line does not seem to change anything.

I did not touch the atu.properties file.