opengeospatial/teamengine — pull request #43 by tanvi-shah (2014-07-15 12:13:33+00:00)
Title: Feature - Customised TestNG report

Adding a service in teamengine-spi to send test statistics and test run results to TestNG report. Also modified the Test Result table, which includes styling changes and adding user friendly test name, test description and reason for test failure insteadof showing the user Java Exceptions that occured when tests were run.

Changes that are done in TestNG report
- We created a service 'com.occamlab.te.spi.report' in teamengine-spi by help of which we can send test statistics to the 'Result overview' page and 'Reporter output page' of theTestNG results.
- Did modifications in testng-report.xsl file of teamengine-spi to change the styling of the result table in the reports as well as to display test name, test description and the reason why a test failed.

In order to support the new user friendly reporting, the developer needs to add the following in his TestNG tests:
- Use the service 'com.occamlab.te.spi.report' to send tests statistics and test logs to the TestNG report in the onFinish method of SuiteFixtureListner
eg. new ReportLog().generateLogs(suite);
where 'ReportLog' is the class and 'generateLogs' is a method which is part of the service added in the teamengine-spi and 'suite' is the ISuite associate with the test.
- Add test description to your tests so that the same is shown in the description column
eg. @Test{description="this is demo test"}
public void demoTest(){}
- Add the reason for test failure in your test assertions
e.g. Assert.assertTrue(booleanValue,"Message that will be displayed in the TestNG report if the test fails")