Help documentation

Managing artifacts and reports

Because all your work is done on remote agents, Cruise provides a mechanism for files to be automatically uploaded to Cruise server following the completion of every job. These files can then be accessed via the Cruise server dashboard, or via the RESTful API.

Publishing artifacts

The first step in using the artifact repository is to tell Cruise which files you want to publish. To do this just specify the path to the file or directory relative to the root of the source control checkout. You also need to specify where Cruise will publish the artifact. You can add as many files and directories as you like.

<artifacts>  
  <artifact src="target/test-reports" dest="test-reports" />  
  <artifact src="target/coverage-reports" dest="coverage-reports" />
</artifacts>

Using tabs

Once your artifacts are safely in Cruise server's artifact repository, you can have the dashboard display them in tabs.

Cruise can display images, text files, or anything else that a browser will normally render in an IFrame. If you display an html page which references other resources (such as images, Flash files or whatever), so long as the resources are referenced with relative paths, they will display correctly.

This mechanism is a simple way to include reports (for example code coverage) in Cruise.

Example

The console tab shows output information from all the phases of the job. This also includes information from the version control system and details regarding the artifacts created and published during the job.

If you produce an html page with an embedded Flash file into your artifact repository:

You can use the following configuration to display it in a tab:

<tabs>  
  <tab name="Recording" path="deployment/drop/smoke/smoke-recording.html" />  
</tabs>

Cruise will create a tab called "Recording" and display the contents of the file in the tab when you click on it:

Publishing tests

Cruise has support for publishing tests from JUnit or NUnit test reports.

You tell Cruise the location of the test reports:

<artifacts>  
  <test src="xstream/target/test-reports" />  
</artifacts>
    

Cruise will:

  • add a tab called Tests that lists the tests in the project
  • add a list of the failed tests to the Failures tab
  • set the properties associated with tests on the job. These include failed-test-count, ignored-test-count, test-time and total-test-count
  • copy the artifacts into the repository. In this case the test reports will be copied into a new directory test-reports in the artifact repository

RESTful API

Cruise publishes all of its information as resources that can be queried through http in the form of RESTful API. See the Cruise integration page for more information.