Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Playwright section to Javascript Collectors page #2514

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pages/test_analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ Test Analytics helps you track and analyze the steps in that pipeline that invol
<%= button ":rspec: RSpec", "/docs/test-analytics/ruby-collectors#rspec-collector" %>
<%= button ":ruby: minitest", "/docs/test-analytics/ruby-collectors#minitest-collector" %>
<%= button ":jest: Jest", "/docs/test-analytics/javascript-collectors#configure-the-test-framework-jest" %>
<%= button ":mocha: Mocha", "/docs/test-analytics/javascript-collectors#configure-the-test-framework-mocha-collector" %>
<%= button ":jasmine: Jasmine", "/docs/test-analytics/javascript-collectors#configure-the-test-framework-jasmine-collector" %>
<%= button ":mocha: Mocha", "/docs/test-analytics/javascript-collectors#configure-the-test-framework-mocha" %>
<%= button ":jasmine: Jasmine", "/docs/test-analytics/javascript-collectors#configure-the-test-framework-jasmine" %>
<%= button ":playwright: Playwright", "/docs/test-analytics/javascript-collectors#configure-the-test-framework-playwright" %>
<%= button ":swift: Swift", "/docs/test-analytics/swift-collectors" %>
<%= button ":android: Android", "/docs/test-analytics/android-collectors" %>
<%= button ":pytest: pytest", "/docs/test-analytics/python-collectors" %>
Expand Down
26 changes: 23 additions & 3 deletions pages/test_analytics/javascript_collectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ To use Test Analytics with your JavaScript (npm) projects, use the :github: [`te
- [Jest](https://jestjs.io/)
- [Jasmine](https://jasmine.github.io/)
- [Mocha](https://mochajs.org/)
- [Playwright](https://playwright.dev)

You can also upload test results by importing [JSON](/docs/test-analytics/importing-json) or [JUnit XML](/docs/test-analytics/importing-junit-xml).

Expand Down Expand Up @@ -44,7 +45,7 @@ With the test collector installed, you need to configure it in the test framewor

### Jest

If you're already using Jest, you can add `buildkite-collector/jest/reporter` to the list of reporters to collect test results into your Test Analytics dashboard.
If you're already using Jest, you can add `buildkite-test-collector/jest/reporter` to the list of reporters to collect test results into your Test Analytics dashboard.

To configure Jest:

Expand All @@ -57,7 +58,7 @@ To configure Jest:
}
```

### Jasmine collector
### Jasmine
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the collector to make it consistent with Jest


To configure Jasmine:

Expand All @@ -80,7 +81,7 @@ To configure Jasmine:
});
```

### Mocha collector
### Mocha

To configure Mocha:

Expand Down Expand Up @@ -120,6 +121,25 @@ To configure Mocha:
}
```

### Playwright

If you're already using Playwright, you can add `buildkite-test-collector/playright/reporter` to the list of reporters to collect test results into your Test Analytics dashboard.

To configure Playwright:

1. Make sure Playwright runs with access to [CI environment variables](/docs/test-analytics/ci-environments).
1. Add `"buildkite-test-collector/playwright/reporter"` to [Playwright's `reporters` configuration array](https://playwright.dev/docs/test-reporters#multiple-reporters) (typically found in `playwright.config.js`):

```js
// playwright.config.js
{
"reporters": [
["line"],
["buildkite-test-collector/playwright/reporter"]
]
}
```

## Save the changes

When your collector is installed, commit and push your changes:
Expand Down