JUnit's stopwatch to capture time taken per integration test in csv file
I was looking to improve my integration test suite, which contains large number of integration test (more than 900 test cases). My immediate focus was to tackle the slowest running tests in my test suite. TestNG reports provide the information of slowest running test out of the box, however my project was using JUnit 4. Being a lazy developer, I didn't want to migrate my entire test suite to TestNG in order to get reports about slowest running test. Hence I was looking at other options available in JUnit test framework. JUnit offers a Rule called stopwatch, which notifies us the time taken to complete each test as callback methods. However, most of the examples showed how to print the information on console or some logger. Printing on the console or logger is particularly not very helpful, as it doesn't allow us to analyse the data in an easy way. Hence I had created a custom stopwatch rule which extends JUnit's stopwatch rule and capture the information provided by ...