• Overview
  • Documentation
  • Version history

Description

Microsoft Visual Studio is a testing framework allows used to define and run unit tests to verify and maintain code integerty. The Microsoft Visual Studio Testing plugin integrates with the Microsoft Visual Studio server to gather and parse test data.

Quick Info

Product icon

Product

HCL DevOps Velocity (HCL Accelerate)
Plugin type icon

Type

plugin
Compatibility icon

Compatibility

HCL DevOps Velocity version 2.0 or later
created by icon

Created by

HCL Software

Published Date

Last Updated

Summary

Microsoft Visual Studio Testing plugin allows for parsing of MSTest and VSTest data from the Microsoft Visual Studio. Data is uploaded to the HCL DevOps Velocity server using an HTTP Post request.

Compatibility

This plugin requires HCL DevOps Velocity version 2.0 or later.

Usage

To use the Microsoft Visual Studio Testing plug-in, the plug-in must be loaded and an instance created. Load the plug-in into the HCL DevOps Velocity container if necessary. From the user interface, click Settings > Integrations > Plugins. On the Plug-ins page, locate the plug-in and click Load Plugin. To create an instance, locate the plug-in and click Install. The plug-in is now listed below those plug-ins to be installed and available for invoking.

Integration type

The Microsoft Visual Studio Testing plug-in parses unit test result data from the Microsoft Visual Studio Testing server.

Invoking the plugin

To gather data from the Microsoft Visual Studio Testing server, send an HTTP Post request with the data to parse. Whenever there is a hit to the endpoint, the data is parsed and displayed as metrics in HCL DevOps Velocity. You can use various methods such as Postman, REST calls, CURL, and CI/CD tools like Jenkins to invoke the plug-in endpoints.

Invoke using Jenkins

Install the HCL Devops Velocity plug-in into your Jenkins server. In your freestyle job or pipeline use the UCV-Upload Metrics File to HCL DevOps Velocity step and provide the required fields. This step allows your build job to upload generated coverage results files to HCL DevOps Velocity.


pipeline {
   agent any
   stages {
      stage('MicrosoftVisualStudioTestingMetrics') {
         steps {
            step([$class: 'UploadMetricsFile',  appName: 'My msTest Test', dataFormat: 'msTestXML', filePath: '', name: 'my-msTest-test', pluginType: 'msTest', tenantId: '', testSetName: 'msTest', metricsRecordUrl: "${env.BUILD_URL}"])
         }
      }
   }
}

Invoke the plug-in using a Rest call

When using a REST call to invoke the Microsoft Visual Studio Testing plug-in, it must be a POST method and include the location of the HCL DevOps Velocity quality data endpoint.

The following request sample shows a REST call that you can copy and update as necessary. Key points about the snippet:

  • The URL points to the HCL DevOps Velocity quality data endpoint. Update with the server location for your installation of HCL DevOps Velocity.
  • The BODY of the call is a multipart/form data. It includes information about the payload.

METHOD: POST 
URL: https:///reporting-consumer/metrics 
BODY (multipart/form-data):
 {
  payload:  // See below for schema format
 testArtifact: 
 }

Invoke using Curl

You can use the following plug-in types and associated data formats for invoking using a CURL request.

Unit Test Data

Categories:

  • Unit Test
  • UNIT_TEST_DURATION

Data Format:

pluginType dataFormat description
msTest vsTestTRX VSTest .trx files
msTest vsTestXML VSTest .xml files
msTest msTestTRX MSTest .trx files
msTest msTestXML MSTest .xml files

Coverage

Categories:

  • COVERAGE_LINES
  • COVERAGE_FUNCTIONS

Note: These formats do not provide branch coverage information.

Data Format:

pluginType dataFormat description
vsCoverage vsTestCoverageXML VSTest .xml files
vsCoverage vsTestCoverageXML MSTest .xml files

Sample CURL Request


curl --request POST \
  --url https://url_devopsvelocity_server>/reporting-consumer/metrics \
  --form 'payload={
  "tenant_id": "",
  "application": {
    "name": "My Application"
  },
  "record": {
    "pluginType": "msTest",
    "dataFormat": "msTestXML"
  }
}
' \
  --form testArtifact=@test-result/MSTest.xml

ucv-ext-vs-quality:1.0.49.tar

Uploaded: 11-Jun-2024 10:21

ucv-ext-vs-quality:1.0.31.tar

Uploaded: 08-Feb-2021 07:45

Pull Command

docker pull hclcr.io/accelerate/ucv-ext-vs-quality:1.0.31
 

Release Notes

  • Plugin name update

ucv-ext-vs-quality:1.0.30.tar

Uploaded: 08-Feb-2021 07:45

Pull Command

docker pull hclcr.io/accelerate/ucv-ext-vs-quality:1.0.30
 

Release Notes

  • Updated npm-wrapper version

Related Plugins