Skip to content

Azure Devops pipeline task to associate test method names to work items

License

Notifications You must be signed in to change notification settings

Superformula/azure-test-binder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Test Binder

An Azure Devops pipeline task to associate test method names to work items.

Build Status


Contents:

Available Scripts

  • build - compile TS
  • build:watch - interactive watch mode to automatically transpile source files
  • checkcommit - validate commit message
  • clean - remove coverage data, Jest cache and transpiled files,
  • clean-deps - remove node_modules
  • clean-generated - remove coverage and build directories and files
  • clean-logs - remove log files
  • commit - start commit
  • format - format files
  • lint - lint source files and tests,
  • nuke - clean everything
  • sort-pj - sort package.json
  • test - run tests,
  • test:watch - interactive watch mode to automatically re-run tests
  • manual-run - invoke the work item association api locally

Building

To build the project with yarn:

yarn install
yarn build

Building the Azure Devops Task

To build the Azure Devops task with yarn:

yarn build:ci
yarn build-az-task

The Task build will output a .vsix file that can be uploaded to Azure Devops

Running

Manual run

To invoke the task locally, you will need to:

  1. Copy the sample.env and rename it .env
  2. Populate the values blank values in your new .env file.
    • AZURE_PERSONAL_ACCESS_TOKEN is a valid Personal Access Token (PAT).
    • ORG_URL is the URL for your organization: e.g. https://dev.azure.com/cool-co
    • PROJECT is your project name. e.g. cool-code from the URL https://dev.azure.com/cool-co/cool-code (not the full URL)
  3. Lastly, you need a valid build id to execute against. The build id is an integer value that can be found with the predefined variable $(Build.BuildId).
  4. Run yarn build:ci
  5. Execute the task: yarn manual-run SOME_BUILD_ID

Testing

To run tests with yarn:

yarn test

About

Azure Devops pipeline task to associate test method names to work items

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •