Skip to content
Advertisement

Failed to parse configuration class, nested exception is java.io.FileNotFoundException: Could not open resource [/test.properties]

I´m trying to configurate new properties for the test, so I created a test config class:

JavaScript

Properties file is in src/test/resources/test.properties

and in the test class :

JavaScript

when I execute the tests the error is: Failed to parse configuration class [ar.com.yo.myproject.main.TestConfig]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/test.properties]

Advertisement

Answer

It seems that the requested properties can’t be found. I would recommend doing this: is that resolve your problem :

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement