This post was written by Daniel Danan from Performance Center R&D
When developing software, performance testing plays a major role in the Continuous Integration (CI) process because you need to test every change to your codebase as early as possible.
To ensure that each new build works seamlessly without introducing errors, it is highly recommended that you have a natural integration between a CI server and a performance testing tool.
We are proud to announce that we have added a plugin for integrating Performance Center with Microsoft Team Foundation Server (TFS), enabling performance and load tests to be run as one of the tasks in your TFS CI build process.
Team Foundation Server is a Microsoft product that provides (not only) source control services and the possibility to create automated builds.
Performance Center is the leading enterprise performance management and testing tool from Micro Focus.
Let’s see how to install and use the Performance Center extension for Team Foundation Server:
The Performance Center CI extension is available from Visual Studio Marketplace. It can also be downloaded from the GitHub Repository where the source code is managed: (the file is named “Micro-Focus.PCIntegration-1.0.0.vsix”).
To install "Performance Center CI" on a Team Foundation Server, perform these steps:
- Navigate to the Team Foundation Server Extensions page on your server (for example, http://someserver:8080/tfs/_gallery/manage).
- Click Upload new extension and select the file you have just downloaded.
- After the extension has successfully uploaded, click Install and select the team project collection into which you want to install the extension.
- Create a task in the build process
After installing the "Performance Center CI" extension, create a new “Performance Center Test” task in your build process (refresh the page of your build process in TFS if required to see this task).
The parameters of the task can be configured very easily and are documented in the wiki page of the GitHub repository managing the source code and in the Performance Center help page. Here are the main ones:
- PC server and port: Enter the hostname or IP address and port of a Performance Center server in the format: http(s)://(PCServer):(port). The default value being: http://mypcserver:80. Note that the PC server must be accessible from the machine that is running the build process.
- 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. We recommend using the default value, unless you need to associate the test with a particular test instance (the ID is available from Performance Center > Test Management > Test Lab > Performance Test Set view).
- Proxy URL, Proxy user name and Proxy password: Use these parameters where the connection to the Performance Center server requires going through a proxy (if the proxy password needs to be hidden, create a secret variable and reference it as suggested above for the “Password” parameter).
- Post Run Action: Choose an action to perform when the run is finished. We recommend using the default value “Collate and Analyze”. Although the build will take longer, you will be sure that the collation has been performed and the analysis report has been generated (it is downloaded to the artifact of the build process).
- Trending: Select a trend report option. We recommend using the “Use trend report associated with the test” option if you have associated the Performance Center test with a trend report.
- Timeslot Duration: Enter a duration in minutes for the Ad-Hoc timeslot. The minimum time is 30 minutes and maximum 480 hours (28,800 minutes).
- Status according to SLA: If you have a pre-defined SLA (Service Level Agreement), defined in your Performance Center test, this option can be useful.
- Build execution Save the build process updated with the new Performance Center task. The next time this build process is launched, you can see the test status in the Build logs.
After the build finishes, open the Artifacts tab to download all files that were uploaded to the artifact by the build process. It contains the log files of the Performance Center task and the various reports (analysis and trend) that were created if you selected them as part of the task configuration.
For more details, see the Performance Center help page.