playwright-community / playwright-msteams-reporter

Microsoft Teams reporter for Playwright
https://www.npmjs.com/package/playwright-msteams-reporter
MIT License
7 stars 3 forks source link

Add Support for playwright-azure-reporter #11

Closed inluxc closed 2 months ago

inluxc commented 2 months ago

Adds support for playwright-azure-reporter

Closes #10

estruyf commented 2 months ago

Thank you, @inluxc, for opening the PR. I wanted to verify this, but noticed that the environment variables process.env.AZURE_* are all returning undefined.

So I created a simple app.js script with the following contents:

console.log(`process.env.AZURE_SERVER_URL`, process.env.AZURE_SERVER_URL);
console.log(`process.env.AZURE_COLLECTION`, process.env.AZURE_COLLECTION);
console.log(`process.env.AZURE_PROJECT`, process.env.AZURE_PROJECT);

When I run it with node app.js, it gives all undefined values. Do I manually need to provide those environment variables to the script like:

- script: |
    node app.js
  env:
    AZURE_SERVER_URL: $(System.CollectionUri)
    AZURE_COLLECTION: $(System.CollectionId)
    AZURE_PROJECT: $(System.TeamProject)
  displayName: 'Run app'

If I do this, it returns the correct values.

inluxc commented 2 months ago

You need to set those env. vars in your .env, as they change for each person.

inluxc commented 2 months ago

@estruyf updated the README to work with azure reporter