Performance Center and TFS
This section describes how to integrate Performance Center with the Microsoft Team Foundation Server (TFS) CI system. This enables the TFS CI build process to trigger the execution of load tests designed on a Performance Center server.
Performance Center-TFS extension prerequisites
To use the Performance Center-TFS extension, you must have the following:
-
A Performance Center server designed to run load tests on Performance Center hosts. For details, see Performance Center Installation Guide.
- The Performance Center-TFS Extension. For details, see Install the TFS extension plugin (Performance Center CI).
-
Powershell version 4.0 or higher.
Install the TFS extension plugin (Performance Center CI)
Before you can run Performance Center tests as part of your build on a TFS CI system, you have to install the extension on your TFS server.
-
Prerequisites
You must have Administrator privileges on the TFS server to install the extension.
-
Verify that your TFS server is up and running. For details, see the TFS Documentation.
Note: For the supported server versions, see the Integration with non-Micro Focus products section of the System Requirements.
-
Download the Performance Center-TFS extension file (Micro-Focus.PCIntegration-1.0.0.vsix) which is available from either:
-
Upload the file to your TFS Manage extension section (
http://<tfs_server_and_port>/tfs/_gallery/manage
). -
Install the extension to your team project collection.
For details on uploading and installing extensions to TFS, see the Microsoft TFS documentation.
Run a Performance Center test from TFS build process’s task
Access your TFS build and do the following:
-
Add an additional build step in the correct place in the build order.
-
In the Task catalog, select the Test tab to view a list of all available test tasks.
-
Select the Performance Center Test task and click Add. A new, empty task is added as part of your build plan.
-
Click Close to edit your build step. Provide the following details for your task:
Name Description Display Name Enter a name to distinguish this build step from other steps. PC server and port Enter the hostname or IP address and port of a Performance Center server in the format:
http(s)://(PCServer):(port)
Default: http://mypcserver:80
User name Enter the user name required to connect to the Performance Center server. Password Enter the password required to connect to the Performance Center server.
Note: You can create a variable of type
secret
in the TFS build to store the password, and specify the variable to avoid exposing a password in the build configuration. For example,'$(PCPassword)')
.Domain Enter the Performance Center domain in which the test to run is stored. Project Enter the name of the Performance Center project in which the test to run is stored. Test ID Enter the Test ID. You can get the ID from Performance Center > Test Management > Test Plan view. Select your test and find the ID in the General Details: Test Name (Id). Test Instance Select an option for adding the Test Instance ID:
-
Automatically select existing or create new if none exists. If you select this option, Performance Center creates a test instance or locates the existing test instance.
-
Manual selection. Enter the Test Instance ID (available from Performance Center > Test Management > Test Lab > Performance Test Set view).
Proxy URL Add your local proxy in the format http(s)://(host):(port#)
, or leave empty if not using a local proxy.Proxy user name If you use a proxy, enter the user name. Proxy password If you use a proxy that requires authentication, enter the password.
Note: You can create a variable of type
secret
in the TFS build to store the password, and specify the variable to avoid exposing a password in the build configuration. For example,'$(ProxyPassword)')
.Post Run Action Choose an action to perform when the run is finished: Collate Results, Collate and Analyze, or Do Not Collate. Trending (Available only when Collate and Analyze is selected as the Post Run Action)
Select a trend report option:
-
Do Not Trend. No trend report is created.
-
Use trend report associated with the test. If Auto Trending is selected in the Load Test, select this option to automatically publish trend results.
-
Add run to trend report with ID. If you select this option, enter the trend report ID.
Timeslot Duration Enter a duration for the Ad-Hoc timeslot.
Maximum: 480 hours
Minimum: 30 minutes
Use VUDs Choose whether to use a Virtual User Day (VUD) license. This provides you with a specified number of Vusers (VUDs) that you can run an unlimited number of times within a 24 hour period.
Before using this option, make sure that VUD licenses are applied in your Performance Center environment.
Status according to SLA Select this option to set the build-step status according to a predefined SLA (Service Level Agreement) configured within your performance test.
If you do not select this option, the build-step will be labeled as "Passed" as long as no failures occurred.
Artifacts directory Enter the path to the artifacts directory where the result files are stored. -
-
Save your build step settings.
Note: To avoid conflicts with the way TFS manages secret input, your entries are validated to ensure the input is correct.
-
Run the build.
View the test results
The Performance Center testing task saves the log file and report in the build artifact directory (supplied in the Artifacts directory field of the Performance Center Testing task; by default “$(Build.ArtifactStagingDirectory)/PCTest”).
The Performance Center Test task does not publish the build artifact directory to the TFS server. Therefore, you should add another task to the TFS CI build process to publish the artifact.
See also: