private String getJUnitReportsFolder ( ) { if ( ClassUtils . isPresent ( "org.testng.annotations.Test" , getClass ( ) . getClassLoader ( ) ) ) { return "test-output" + File . separator + "junitreports" ; } else if ( ClassUtils . isPresent ( "org.junit.Test" , getClass ( ) . getClassLoader ( ) ) ) { JUnitReporter jUnitReporter = new JUnitReporter ( ) ; return jUnitReporter . getReportDirectory ( ) + File . separator + jUnitReporter . getOutputDirectory ( ) ; } else { return new LoggingReporter ( ) . getReportDirectory ( ) ; } }
Find reports folder based in unit testing framework present on classpath .