Uploader

TestPulse’s uploader is the bridge between your Github actions and our app. In a nutshell, this utility zips the test and coverage results and uploads them to our server so that they get processed. You must properly configure the utility so that it’s able to upload all relevant files.

The testpulse-upload utility accepts different parameters:

Parameter name Required Description
--test-results-regex, -tr *Required A regex pointing to files related to test results, i.e., JUnit XML files. You may pass this argument multiple times if you need different regexes. Example: -tr "build/test-results/test/.*\.xml"
--coverage-results-regex, -cr *Required A regex pointing to files related to coverage results. You may pass this argument multiple times. Example: -cr "build/reports/jacoco/test/.*\.xml"
--test-type, -tt Optional Unique identifier for that test suite type. You are free to pass any string as long as they are unique within your test suites (two different test suites can’t use the same identifier). More info here. For example, -tt unit would indicate that the tests are related to the unit test suite.
--config-file, -cf Optional Path to TestPulse’s YAML configuration that allows you to control certain parameters of the reports. Example: -cf .testpulse.yaml
--language-version, -lv Optional The version of the programming language you compiled or are running the tests. Useful if you run the same tests in multiple different language versions. Example: -lv 3.8
--test-framework-version, -tfv Optional The version of the test framework. Useful if you use different test frameworks. Example: -tfv 3.0.0
--operating-system, -os Optional Operating system. In most CI this is automatically detected by TestPulse, but you can always specify it manually in which case we will overwrite the value from the CI. Example: -os Windows

*Required: You must specify one of these parameters (or both): e.g., you can pass only test results, or coverage results, or both. If you do not pass any of these parameters, the upload will pre-emptively terminate.

For example, if we export the test results to build/test-results and coverage to build/reports/jacoco, we can write:

testpulse-upload -tr "build/test-results/test/.*\.xml" -cr "build/reports/jacoco/test/.*\.xml" -cf .testpulse.yaml