Because AscentialTest’s built-in test framework contains calls to actions that start and complete each test, it is very easy to transform test results into whatever format is needed for integration with continuous integration tools like Azure DevOps.
Zeenyx Support has written the following components for writing AscentialTest results in Junit format.
This test creates a results file in XML-JUnit format. It should be included as the first test at the top of each Test Plan:
This function updates the results file with the result of the current test:
3. Appstate Requirements.
In order to implement the provided project components, the following lines need to be added to the OnFinish() function of your appstate:
The appstate needs to be further modified to add a new String member called sErrorMsg. The OnException() needs to be overridden to set the value of sErrorMsg as displayed below:
4. Project Data Requirement
In order to implement the provided project components, ResultsFileName and ResultsFilePath string parameters must be added to the Project Data:
Once the provided components are added to the project, the results will automatically be transformed into the Junit XML format.
Below is an image depicting the results as displayed in Azure DevOps. This example was generated using the ‘Publish Test Results’ Task.
If you would like a copy of the Junit Results generation, please contact Zeenyx Support.