This is a standalone tutorial covering custom publishing.
As mentioned in the Add to CI help article, there are two types of projects - Connected and Standalone. This section of the tutorial focuses exclusively on the steps required for publishing results using a standalone project. A standalone project is applicable when running custom test automation - not connected to GitHub, GitLab, or Bitbucket repositories.
$ testspace results.xml coverage.xml ...
Refer to the Add to CI help article for details on CI/Automation integration.
Now login into your Testspace account.
You will now create a Testspace
project to be used for this section of the tutorial. Select the
New Project button(only availabe to admin accounts) at the top right of the page. You can select whether to make this project
Public by the checkbox in the upper right corner, the default is private.
Provide a Project name and optional description and
Note, if a list of repos is presented make sure to select the
STANDALONE button on the left/bottom side.
Once a new Project has been created a space for publishing needs to be added as well.
New Space button to bring up the dialog shown below.
Provide a Space name and optional description and
As a prerequisite to pushing test content the Testspace client console utility is required to be installed on your host computer. Refer to the client installation instructions for Windows, Linux, and macOS computers.
$ testspace --version
For simplicity, create a file called
results.xml with the following pre-canned test results:
<testsuites name="example" tests="2" failures="0" time="2.0"> <testsuite name="Hello Automation"> <testcase classname="Hello Automation" name="Test Case One" time="1.00"/> <testcase classname="Hello Automation" name="Test Case Two" time="1.00"/> </testsuite> </testsuites>
Using the newly created file go ahead and push data to the server using the following:
$ testspace results.xml YOUR_TOKEN:@YOUR_ORG.testspace.com/YOUR_PROJECT/YOUR_SPACE
After making the following changes:
YOUR_ORGto the name you picked when signing up to Testspace (e.g. 'myOrganization')
YOUR_PROJECTto the name used
YOUR_SPACEto the named used
YOUR_TOKENto your Testspace User access-token
If appropriate you could do a one time
$ testspace config url YOUR_TOKEN:@YOUR_ORG.testspace.com/YOUR_PROJECT/YOUR_SPACE
Then pushing looks like:
$ testspace results.xml
For setting options see:
$ testspace --help config
For more information on publishing features, refer to the Push Data section of the help documentation:
- Using incremental pushes by calling the Testspace client multiple times
- Adding Code Coverage
- Passing wildcards, sub-directories, etc., for finding results files
- Adding custom metrics
The section covered the setup steps and options for publishing test automation results:
- Create a Testspace project and one or more spaces
- Installing the Testspace client
- Option for configuring the Testspace client
- Options for pushing data