In this section:

Introduction

The Parasoft Continuous Testing Extension for Azure DevOps enables you configure various actions needed for automated, continuous testing across your software delivery pipeline. You can configure build steps for:

  • Provisioning environments into the specific states needed for automated testing
  • Replicating environments and associated assets to different Virtualize servers
  • Executing Parasoft test scenario jobs (tests suites that execute vs. specific environment configurations)
  • Destroying "dirtied" test environments to ensure that subsequent tests always begin with a clean slate
  • Disconnecting a Virtualize server from CTP to remove unnecessary connections
  • Publishing test execution results to Parasoft DTP

Requirements

  • CTP 2020.1 or higher must be hosted at a publicly available IP address.   
  • DTP 2020.1 or higher for publishing test execution XML report and test environment information to DTP; must be hosted at a publicly available IP address.     

Installation

  1. Log into Azure DevOps and choose Browse marketplace from the marketplace menu.

  2. Search for Parasoft Continuous Testing and click on the tile in the search results.
  3. Click Get it free on the extension details page. 
  4. Click Install when prompted.

Functionality enabled by the extension will be available when you configure release pipelines. See Configuration for details.

Configuration Service Connections

The instances of Parasoft CTP and DTP connected to your Azure DevOps project must be available at a public IP address. Refer to the Deploying Virtualize to Cloud-based Microsoft Environments guide for details about deploying CTP to an Azure VM. Refer to the DTP documentation for information about deploying DTP to cloud-based services. When CTP and/or DTP are available, you can configure a service connection for your project.

  1. Open your project and choose Pipelines > Service connections.
  2. Click Create service connection and enable Parasoft CTP.
  3. Click Next and specify the connection settings to the CTP server.
  4. Specify a service connection name and click Save.
  5. Repeat the process for Parasoft DTP if you intend to report results to DTP. 

You will be able to use the service connection endpoints in your pipeline tasks.

Configuring Tasks

The extension includes the following tasks that you can add to your release pipeline:

Parasoft Service Virtualization DeployProvisions environments into the specific states needed for testing and optionally replicates environments and associated assets to different Virtualize servers (including servers dynamically-provisioned from Docker or other container technologies).
Parasoft Execute JobExecutes one of the test scenario jobs (tests suites that execute vs. specific environment configurations) available on the connected instance of Environment Manager. 
Parasoft Service Virtualization DestroyDeletes "dirtied" test environments to ensure that subsequent tests always begin with a "clean" test environment.

Parasoft Service Virtualization Disconnect

De-registers a specified Virtualize server from Environment Manager.

Adding Tasks

You can add and configure tasks in a release pipeline job:

  1. Open your project choose Pipelines from the sidebar menu. 
  2. Click on an existing pipeline and click Edit or create a new pipeline.
  3. Add a new stage or click on an existing stage. 
  4. Add a task to the stage and choose a Parasoft task.
  5. Configure the task(s) accordingly. Refer to the following sections for details:

Configuring a Deploy Environment Task

This task provisions environments into the specific states needed for testing. As an additional option, it can also replicate environments and associated assets to different Virtualize servers (including servers dynamically-provisioned from Docker or other container technologies). 

The following fields are required:

Display nameSpecifies the name for the task.
Parasoft CTP EndpointSpecifies the CTP to use for the task. Choose an endpoint from the drop-down menu. See Configuring Service Connections.
SystemSpecifies the system in CTP that contains the environment instance you want to provision. Choose a system from the drop-down menu. 
EnvironmentSpecifies the environment in the CTP system that contains the instance you want to provision. Choose an environment from the drop-down menu.
InstanceSpecifies the environment instance to provision. Choose an instance from the drop-down menu.

Enable the Copy the environment assets option to replicate the environment and associated assets (virtual assets, proxies, JDBC controllers, etc.) to a new Virtualize server before provisioning. Specify the name of the Virtualize server and the name of the environment where the assets will be copied. The environment will be destroyed later in the release pipeline process.

Enable the Duplicate data repositories option to duplicate the associated data repositories before provisioning.

Choose one of the following options to specify where the repositories should be copied:

On the current Data Repository serverCreates a new copy on the same Data Repository server where the repositories currently exist. 
To a Data Repository server on the same host as the target Virtualize severCreates a new copy on the target Virtualize server. If you select this option, you will need to specify the Data Repository port, username, and password.
To a Data Repository server on a specific hostCreates a new copy on the specified Data Repository. If you select this option, specify the Data Repository host, port, username, and password.

Control Options 

Enable the control options to configure the conditions under which the task should abort.

  • Enable the Continue on error option to allow the task to run even if errors are present.
  • Specify the number of minutes to allow the task to run before timing out in the Timeout field.
  • Choose a specific condition from the Run this task drop-down menu to specify additional behaviors. If you choose the Custom conditions option, you can specify an expression that controls the task. Refer to the Microsoft Azure DevOps documentation for additional information about custom conditions.

Output Variables

You can specify a list of output variables to associate with the task. Refer to the Microsoft Azure DevOps documentation for additional information about output variables.

Configuring an Execute Job Task

This task executes one of the test scenario jobs (tests suites that execute vs. specific environment configurations) available on the connected instance of Environment Manager. You can also publish the test execution results to DTP.

The following fields are required:

Display name

Specifies a name for the task.

Parasoft CTP EndpointSpecifies the CTP to use for the task. Choose an endpoint from the drop-down menu. See Configuring Service Connections.
JobSpecifies the job to run. Choose an existing job from the drop-down menu.

Enable the Abort job after timeout option and specify the number of minutes in the Timeout minutes field that Azure DevOps should wait before the task stops with a timeout. 

Enable the Publish test execution results to DTP option if you want to report the job execution results to Parasoft DTP.

Configure the following settings:

  • Choose the service endpoint for the instance of DTP from the drop-down menu.
  • Specify the DTP Project, build ID, and session tag. Refer to the DTP documentation for additional information about projects, build IDs, session tags, and other metadata associated with test and development artifacts. 
  • Enable the Append variable set environment to session tag if configured option if you want to include the execution environment setting (exec.env) in the test results when publishing to DTP. This enables you to aggregate test data according to execution environment, which can be displayed in DTP widgets and reports, e.g.:.

Control Options

See Control Options.

Output Variables

See Output Variables.

Configuring a Destroy Environment Task

This build step deletes duplicate test environment to ensure that subsequent tests always begin with a clean test environment.

Specify the following fields:

Display nameSpecifies the name for the task.
Parasoft CTP EndpointSpecifies the CTP to use for the task. Choose an endpoint from the drop-down menu. See Configuring Service Connections.
SystemSpecifies the system in CTP that contains the environment instance you want to destroy.  
EnvironmentSpecifies the environment in the CTP system that contains the instance you want to destroy. This should match the name of the duplicate environment created in the Configuring a Deploy Environment Task configuration.

Control Options

See Control Options.

Output Variables

See Output Variables.

Configuring a Disconnect Virtualize Server Task

This task de-registers a specified Virtualize server from Environment Manager. Specify the Parasoft CTP endpoint where the server is located and choose an option for identifying the server to disconnect. Enable the by host option and  specify the host IP of the server or enable the by name option and specify the server name in the field provided to disconnect a Virtualize server.

Control Options

See Control Options.

Output Variables

See Output Variables.

Reviewing Task Progress and Results

To view the console output for an in-progress task, click the task in the progress list. This opens a page with status details and links to the associated Environment Manager host and environments. 

  • No labels