Skip to content

[enhancement]: AzureTestPlan@0 - Add controls to set working directory and environment variables in the task #21557

@satviknayak

Description

@satviknayak

Task name

AzureTestPlan

Describe your feature request here

[enhancement]: Add controls to set working directory and environment variables in the AzureTestPlan@0 task

Currently when running the AzureTestPlan@0 task there are options to set TestPlan, TestSuite, TestConfiguration and TestLanguageInput. But there is no controls or options a user can set the working directory where the npm commands should run or ways to set environment variables for their run configuration.

I am working on an playwright project for UI testing and was looking at ways to integrate Azure test plans with playwright typescript tests, when I came across this task.

As part of the test run, we are selecting the environment url at runtime using environment variable (process.env.ENV_ACTIVE).

I was hoping if there could be some kind of enhancement be done to the task so that the user can select working directory and set environment variables in ways similar to CmdLine@2 task.

CmdLine@2:

- task:  CmdLine@2
  displayName: "Test script"
  inputs:
    script: |
      echo Hello World
  env:
    ENV_ACTIVE: qa

AzureTestPlan@0 expectation:

- task:  AzureTestPlan@2
  displayName: "Azure Test Plan - Automated Tests"
  inputs:
    testSelector: automatedTests
    testPlan: 1
    testSuite: 2
    testConfiguration: 3
    testLanguageInput: Playwright
  env:
    ENV_ACTIVE: qa

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions