Knowledge Base Article

> Knowledge Base > Rapise

In some cases it is convenient to store tests in the same Git repository where source code of an application under test is located. For example, if you are using Visual Studio Team Services.  From this article you will learn how to execute Rapise tests stored in a Git repository with SpiraTeam and leverage the power of SpiraTeam reporting and analysis features.

Link Tests to Test Cases

First, link your tests to SpiraTeam test cases. Plan to clone the Git repository with tests to the same absolute path on hosts where you want to execute the tests. To link a test open corresponding test case in SpiraTeam and scroll to Automation section.

  1. Set Automation Engine to Rapise
  2. Set Script Type to Linked
  3. Set Filename to absolute path of the test
  4. Save the test case

Create Test Set

Next step is to create a test set and include there the test cases linked to Rapise tests.

Then configure the test set.

  1. Set Typeto Automated
  2. Set Automation Host to a host where you plan to execute the test set
  3. Save the test set

Configure RapiseLauncher

Then on the automation host specified in the test set configure RapiseLauncher. It must be connected to your SpiraTeam instance and have same Automation Host Token as specified in the test set.

Ready to GO

We  are almost ready to run the test set from a command line. Just need to capture a couple parameters. When you login to SpiraTeam you work with a project, record its Id.

Open your test set and record its Id.

The command line to execute the test set 54 in the project 2 looks this way:

"c:\Program Files (x86)\Inflectra\Rapise\Core\bin\RapiseLauncher.exe" /testset:54 /project:2

So you can clone the Git repository to the defined absolute path (in our example it is the root of the drive C, remember the filename parameter of a test case set to 'c:\rapise-framework-examples\SpiraFriendlyArchitecture\CreateNewBook\CreateNewBook.sstest') and then execute it, all with a few lines:

pushd C:\
if exist rapise-framework-examples (
    rmdir rapise-framework-examples /S /Q
git clone

"c:\Program Files (x86)\Inflectra\Rapise\Core\bin\RapiseLauncher.exe" /testset:54 /project:2

After execution view and analyze results as usual by looking into test runs.

Click on a test case name to view the detailed report.

CI Integration

The approach to running Spira-linked tests presented above can be easily implemented with popular CI tools like Jenkins and TeamCity. You just need to define two tasks

  1. Put tests into specific folder
  2. Run the test set via RapiseLaucnher

Let's see how to implement these tasks in VSTS.  Create a new build definition with three steps.

  1.  Get sources gets latest version of tests from a Git repository
  2.  Copy Files copies tests from TFS Agent temp folder to C:\
  3.  Run executes RapiseLaucnher

Note: The host running TFS Agent must have Rapise and RapiseLauncher installed. This is what we call Automation Host above.









Selected files will be attached to any email sent on saving ticket.

file selected files selected  () Delete Selected

  • Created:
  • by:

Select files to upload

Or drag and drop files here

Uploading …
Upload More?
There was an error.
Try again?

Save to upload the selected file(s)

Article Info
  • Last Updated: 9/19/2017
  • Article ID: KB293
  • Views: 5060