Thursday, March 20, 2014

junit: Header line for each test

This code will print nice junit header line. You could put the code in base class of your tests.

    @Rule public TestName name = new TestName();
   
    @Before
    public void before(){
        System.out.println("\n\n========================================= " + this.getClass().getSimpleName() + " -> " + name.getMethodName() +  "() ==================================\n");
    }



No comments:

Post a Comment