I'm writing a java program in Eclipse that runs gradle and unit tests. These tests output a bunch of information to the console. When a certain line comes up in the output I want to execute a certain method.
I would like to know if there is a way that I can scan the console output for a specific string, and when that string is found to execute my next method.
Basically I want an IF-THEN statement, while my program runs, that says if(ConsoleString==TargetString), do(This)
.