Agilitest is able to generate an xml file containing all the important information about the test process, as well as the successive images of the different actions performed.
These files can then be used to produce all types of documents for:
- Analyze the causes of test failure
- Check that the layout of the screens is correct when changing languages
- Document the use of the application
- Present the functioning of an ongoing development to the rest of the team or a client.
There are many uses, which is why we have chosen to rely on an open format (XML) and a document generation engine under free license: FOP
Setting up Agilitest to produce the XML report
In the editor:
In the "Channel Management" tab, select the "Parameters" menu, then "XML Report".
Then, start the test execution.
At the end of the execution, the following files are generated in the directory target/report/<name of the test>_xml/
Actions.xml : file containing the execution metadata
1.png … n.png : as many image files as screens viewed during the test.
In continuous integration:
You must first generate a TestNG execution file.
To indicate that you want to generate the XML report
Select the corresponding execution
Click on the small pencil allowing the modification
Check the XML Report box.
Start the execution of the selected tests
Files are generated in the same subdirectory from the root declared as continuous integration.
Installation of FOP
FOP is automatically downloadable in the "Settings" section of Agilitest, just click on the download button. If you have a special need, perform the following operations:
- Download FOP (fop-2.3-bin.zip) by following the link : https://xmlgraphics.apache.org/fop/download.html
- Perform a standard installation
- Set up your PATH so that the fop executable can be found
- Open the System Control Panel (type "system" in the Windows search)
- Select "Advanced system settings"
- Click on the "Environment Variables…" button, then click on "New…" in the "System Variables" section, then click on "New" to add the path to the installed FOP.
To produce a pdf file, FOP need a XSL style sheet:
based on the XSL-FO standard:
This allows you to produce the document in the format you want relatively easily.
We provide a default style sheet to help you in this process. (See link fop_files)
Generation of the pdf file
To launch the generation, you have to:
- Open a Windows command window ("command prompt" or "cmd")
- Go to the directory (for this purpose use the command "cd " in the command prompt) in which all the parts useful for generation are located:
- The style sheet called stylesheet.xml
- The file generated by Agilitest actions.xml
- Screenshots of the Agilitest test run
- The various images and files used by the style sheet (examples are provided in the "file_fop" zip)
- Enter the command line allowing the generation of the file named "report.pdf":
- fop -xml actions.xml -xsl stylesheet.xml -pdf report.pdf
- Press "Enter" to launch the command..
You will find in the following archive a set of files that will allow you to start : fop_files