Genetec / azure-devops-extension-publishtestresultscreenshot

Azure DevOps extension used in CI pipeline to upload screenshot in test results report.
https://marketplace.visualstudio.com/items?itemName=Genetec.publish-test-result-screenshot
Apache License 2.0
10 stars 6 forks source link
azure-devops azure-extensions azure-pipelines pipeline screenshot test-results ui-testing

PublishTestResultScreenshot for Azure DevOps

DEPRECATED: This Azure DevOps extension is no longer maintained. An alternative solution is to use the Publish Test Result task which now supports file attachments.

Get more insight on your UI test failure with screenshots.

Installation

You can get the task from the Visual Studio MarketPlace.

How to use

Requirements

Compatibility

Version 0.1.x is compatible with:

Configure

Available inputs:

Required

Optional

Using classic editor

Using YAML

- task: Genetec.publish-test-result-screenshot.pipeline-extension.PublishTestResultScreenshot@0
  displayName: 'Publish test result screenshot'
  inputs:
    organization: {yourOrganizationName}
    screenshotFolder: {yourCustomPath}

Specifications

This task uses azure-devops-node-api which, under the hood, uses the Azure DevOps REST Api.

Task Results

How to build

Prerequisites

You will need to install nvm, and npm with node to run this project.

Verify versions

I used the latest version but just make sure that all commands return a version number.

Getting started

Clone the repo

git clone git@github.com:Genetec/azure-devops-extension-publishtestresultscreenshot.git

Setup for local use

  1. Uncomment the header of index.ts and set input values
    // **********************************************************************************
    // ************************* FOR LOCAL USE ******************************************
    // process.env.ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN = ""
    // process.env.SYSTEM_TEAMPROJECT = ""
    // process.env.INPUT_ORGANIZATION = ""
    // process.env.INPUT_SCREENSHOTFOLDER = ""
    // process.env.BUILD_BUILDID = ""
    // **********************************************************************************
  2. Assign your access token to ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN

Compile the typescript into javascript

Execute the task locally

Deploy and test on DevOps

Before submitting your PR, make sure to test your changes on your DevOps instance using the following command:

tfx build tasks upload --overwrite --task-path "myPathToTheTask" --service-url "https://myOrg.visualstudio.com/DefaultCollection" --auth-type pat -t "xxx"

The PAT (personal access token) requires only the Manage Agent Pool permission.

How to contribute

Check Contribution Guide

License

Published under Apache 2.0 License