Skip to content

Commit

Permalink
Merge pull request #2514 from buildkite/pie-2029/add-playwright-to-ja…
Browse files Browse the repository at this point in the history
…vascript-collectors

Add Playwright section to Javascript Collectors page
  • Loading branch information
nprizal authored Oct 11, 2023
2 parents fa8ae33 + 0fd55fa commit 10e670a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
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
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

0 comments on commit 10e670a

Please sign in to comment.