Using Total Test Jenkins plugin for Virtual and non-Virtual Tests



This topic describes how to setup a pipeline with one build step for virtual and non-virtual testing.

To create a Freestyle Project

Follow these steps to create a Freestyle Project:

  • Open Jenkins and select New Item.
  • Enter an appropriate project name and select Freestyle project.
  • Click OK. This will open the project for configuration and the General tab displays.
  • In the Description field, enter a comment describing the project.
  • Scroll down to the Build section and click Add build step.
  • In the dropdown, select 

    Total Test

     - Execute Total Test scenarios. This will display the properties that have to be filled.

  • Select the desired Host and the host connection userid you want to use. Click on Add if needed.
    image-2023-10-16_12-27-21-1.png
  • The example uses the TotalTestConfiguration project to execute a Virtual test. Check the Use local configuration box and add the path to your TotalTestConfiguration project.
  • If you want to execute a non-Virtual test add the server url into the CES URL field.

    Important

    Using the CES server enables you to execute both Virtual and non-Virtual tests.

  • Add the path to the Scenarios folder you want to execute.
    image-2023-10-16_12-29-54-1.png
  • If you want to refine which tests to execute, check the Select Programs to Execute box and then use the Select Programs or JSON file box. If you do not select this option, then all tests in the Scenario folder will be executed.
    image-2023-10-16_12-31-40-1.png
  • Change the Logging level to ALL if you want detailed logging.
    image-2023-10-16_12-39-15-1.png
    image-2023-10-16_12-39-43-1.png
  • Select the Collect Code Coverage check box if you want to obtain Code Coverage information.
    image-2023-10-16_12-41-7-1.png

To create a Pipeline project

Follow these steps to create a Pipeline Project and name it the same as the Total Test Project.

  • Open Jenkins and select New Item.
  • Enter an appropriate project name and select Pipeline.
  • Click OK. This will open the project for configuration and the General tab is displayed.
  • Copy the following information and paste it into the Pipeline Script field:

    stage("Run Total Test")
    {
     // This stage uses the Total Test Plugin to run a Total Test Scenario
      node{
     }
    }

  • Click SAVE.
  • Select Configure.
  • Select the Pipeline Syntax link below the script field
  • Select totaltestUT: Total Test  - Execute Total Test scenarios from the Build Step drop-down list.
  • The same fields are available as for setting up the Freestyle project. Fill the fields as desired.
  • Click Generate Pipeline Script.
  • Copy the generated script step as illustrated in the following image to your clipboard.
    image-2023-10-16_12-45-34-1.png
  • Return to the Project and select Configure.
  • In the Script field, add a new line after the node{ line.
  • Paste the generated script step from the clipboard into the new line. You will have a pipeline script as the following:
    image-2023-10-16_12-47-26-1.png
  • Click SAVE.

Running a pipeline

  • Return to the Jenkins Home page.
  • In the list of projects, find the project that you want to run and select. It will display a page where you can see the details about the project.
  • At the project page, click Build Now. You will see a new Build start in the Build History area.
  • When the built has completed, click the Build # for the completed build in the Build History area.
  • Select Console Output to review the Console Output for the Build #.
  • Scroll to the bottom of the page and look for "SUCCESS" or "FAILURE".



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*