-
Notifications
You must be signed in to change notification settings - Fork 40
Reporting for TEAM Engine 5.0
Reporting is expected to be one the major changes in TEAM Engine 5.0. Improving the reporting will allow users to better understand the errors and possible fixes. The report should contain the following information:
- Name of the test
- Revision of the test
- Version of TEAM Engine use to run the test
- Date and Time
- Test artifact (URL end of point of the server, name of the file, etc.)
- Show final result of the test
- Show first what is the "basic" conformance class.
- About conformance classes
- show the name of the conformance class.
- show by conformance classes how many tests passed, failed or skipped
- link to the conformance class to get more details about the test and direct reference to the specification Annex A or B, where the conformance classes were declared.
- Show the input (e.g. request performed by the server, parameters, etc.)
- Show the output (e.g. response made by the server)
- Show the error
- Explain the error
- Provide list of suggestions
- The report should be the same for all type of tests (TestNG or CTL)
- The report should have the same output in XML when the test is run via:
- command line
- rest API
- web user interface
Results of TestNG and CTL can be converted to EARL: http://www.w3.org/TR/EARL10-Schema/.
For the purpose of creating better and generic reporting for all test suites, some of the three reports should be used: CTL test, client test or TestNG test. TestNG seems the easiest path. If all the tests are transformed to TestNG results a transformer can then be used to converted it to HTML.
The major steps to be done in coding perspective:
-
Convert CTL test result and Client test result in TestNg format
i. Create a Java code snippet in TECore.executeTest(TestEntry test, XdmNode params, XPathContext context) method which stores CTL test and client test result necessary information in Json format.
ii. After completion of the test, then we use that Json result and convert it to TestNg project XML format, this thing run after the complete suite stop. This operation perform from TECore.execute_suite(String suiteName, List params)
-
Then write a code snippet (XslHtmlTransformer) in service provider which take input as an XML (final result) and transform the result in form of HTML using xslt stylesheet we create an html file in user log directory.
For diagram click here
From the above diagram steps can be listed as:
- Get result from ctl/client test in form of json.
- Convert that json result in form of xml which look same as testng result
- Parse this xml result with xslt sheet (which is written in TEAMEngine service provider).
- Generate another xml result which contain all information including all html tag.
- Save this data into user log directory.
By this approach we get following advantage:
● When we ran the TestNgest via REST API at that time result comes in the form of XML so if we pass that XML result to new snippet which written in service provider part it converts it into an html.