As an open-source project, community contributions are encouraged.
The local development environment consist of the following:
- node 16.x
- TypeScript 4.6.3
- Visual Studio Code
- PowerShell Core 7.x
# install typescript dependency
npm install -g [email protected]
# compile
cd .\PublishTestPlanResultsV1
npm install
tsc
To execute the mocha tests:
- Open VSCode from the
\PublishTestPlanResultsV1
folder - Install the "Mocha Test Explorer" extension
- Modify the .vscode settings file and adjust the
mochaExplorer.env
with variables that reflect your environment:- SYSTEM_COLLECTIONURI: the URL to your Azure DevOps Organization
- SYSTEM_ACCESSTOKEN: PAT token to your Azure DevOps Organization
- ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN: PAT token to your Azure DevOps Organization
- TEAMPROJECT: the name of an Azure DevOps Project that contains a Test Plan for testing
- PROJECTID: the guid for the TEAMPROJECT
- TESTPLANID: the numeric identifier for a Test Plan in your Azure DevOps Project
- TESTROOTSUITE: the numberic identifier for the top-level suite in the Test Plan
- Run the tests, they should all pass.
Prior to checking the changes in, please test out your changes locally:
-
Compile the extension (
tsc
) -
Set breakpoints where appropriate
-
Open a command-prompt and start PowerShell Core (
pwsh.exe
) -
Run the supplied PowerShell script:
cd PublishTestPlanResultsV1 .\Test-ExtensionLocally.ps1 -DebugMode
-
Provide the necessary values when prompted or press
enter
to accept default values. To provide prepopulated answers for these prompts, create environment variablesINPUT_<variable-name-in-prompt>
. -
In VSCode, use
> Attach to NodeJs process
. Provide the PID that appears in the command-output.