javamavenselenium-webdrivercucumbercucumber-java

Online Cucumber Report And Console Output is in the Same Line


This is a selenium java project,and using Intellij Idea to run the test automation scenarios. It generates online cucumber report at the end. But as you can see in the image, unfortunately, it combines apache maven console logs and cucumber report. Where can i manipulate the console outputs to put some space?

cucumber report console output

The first thing comes to my mind is Apache surefire plugin which provides loggs. I was thinking to customize a logger class and when i detect the report i can put some space between them.


Solution

  • I figured out a simple solution for this issue. We needd to put next line on finish in custom testng listener.

    public class TestNGListener implements ITestListener {
    
    @Override
    public void onFinish(ITestContext context) {
        //This line is necessary to indent properly the online cucumber report outputs
        System.out.println("\n\n");
       }
    }
    

    Solution for console output