Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Adding a New Script Test

Jeremy Poulin edited this page May 2, 2018 · 3 revisions

Test Overview

Important The default template will not run scripts by default. This is a feature planned for a future release. When it is released, it will work roughly as follows: The default template will set up to run be able to run all scripts that live in /tests/scripts. The structure of these tests should be a directory containing a test.sh that will be called when the script runs. The test directory can optionally have a output directory named artifacts whose contents will be archived when the test completes.

Steps

  1. On you're local command line, clone the new repo.
$ git clone https://github.com/[github-username]/multiarch-ci-test-template
  1. Add the new script test to the /tests/scripts directory.

  2. Commit and push the added test to the github.

$ git commit -am "Added new test to /tests/scripts"
$ git push
  1. Run the test via the Jenkins UI.

Archiving Your Test Output

Most tests have some sort of output they'd like to save. For the test template, we set it up so that anything under the following structure will be archived when the test completes:

/tests/scripts/[your-test-name]/artifacts

Generating JUnit Reports

Somes tests have output junit results xml. For the test template, we set it up so that any xml file under the following structure will be reported as junit xml when the test completes:

/tests/scripts/[your-test-name]/reports