Reputation: 27
I'am looking for a way to show logs/ results of JUnit tests in Eclipse. My tests are running fine but I have no way to verify if it is semantically correct. I don't need to export reports, just need to check its log. Any help would be appreciated!
I'm very new to Java and Eclipse therefore having hard time to get used to these dev environment.
Upvotes: 0
Views: 9589
Reputation: 523
I would suggest using a Logger such as slf4j, you'd bring the logger into your test class as such
private static final Logger LOGGER = LoggerFactory.getLogger(MyTestClass.class)
Then create some logging statements to see your values
LOGGER.info("The value of the thing is: " + variableValue)
This way you aren't using System.out.println
all over your code but still get an output in the console when running your tests
Upvotes: 3