There are a few ways to run automation with PractiTest.
You can read about them here
Firecracker allows you to take XML report files from any CI/CD tool and upload them into PractiTest. From now on, every time you have new build results, they will be sent to PractiTest where you will be able to see the results of your entire software development and deployment processes in one solution.
Start by setting up the Firecracker’s configuration. This configuration will be used for the report file uploading process into PractiTest. Access Firecracker here and follow the steps below:
Upload the XML result files
Paste the API token you have generated from the Account Settings - General. From the project dropdown list select the project you would like to send results to.
Recommended: Map PractiTest custom fields with your XML report files’ fields. Mapping the fields will allow you to see the results of your automated tests in reports and graphs. For example, if you have a field called ‘class_name’ in your automated tests and you map it with a PractiTest custom field, you will be able to see the equivalents of your automated tests, in PractiTest’s reports and dashboard graphs.
Note: PractiTest field values can be modified using the ‘Function’ option.
Click the ‘Download Configuration’ button. You will receive a JSON file.
Create a folder that will store your XML files, the configuration JSON file you downloaded and the JAR file of Firecracker that can be downloaded from here in this structure:
Note: The File & folder names can vary based on your selected names.
Now you need to run the command below, in any Shell, in order to send results into PractiTest:
*. Make sure you specify the name of your relevant folder.
java -jar practitest-firecracker-standalone.jar --reports-path="xml_reports" --testset-name="TEST_SET_NAME" --author-id=USER_ID --config-path="CONFIGURATION_FILE.json" \create-and-populate-testset
*Make sure you have Java installed on your machine
USER_ID should be a user who belongs to a PractiTest account. you can retrieve user IDs by sending this GET request.
Now you are able to see all the results in PractiTest.
In case you created a firecracker test manually and you want it to be updated with the new runs, please make sure the name you give it matches the name of the test in the xml file.
To make this uploading process automatic, you will need to write a script that will download new XML report files into the ‘xml_reports’ folder, remove old files and run the command. This way every time you get a new build and result files, they will automatically be uploaded into PractiTest.
In case you need to map more fields or to change the project you are sending results to, you can always upload the Configuration file to the Firecracker UI mode, modify it and download an updated version.No need to remap existing fields, only to update the information when needed.