Skip to content

Commit

Permalink
feat(playwright): track HTTP status codes (#2383)
Browse files Browse the repository at this point in the history
Track HTTP status codes via browser.page.codes.<CODE> counters.
  • Loading branch information
hassy authored Dec 19, 2023
1 parent 854765f commit 0f9e351
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/artillery-engine-playwright/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ class PlaywrightEngine {

debug('page created');

page.on('response', (response) => {
const status = response.status();
events.emit('counter', 'browser.page.codes.' + status, 1);
});

page.on('domcontentloaded', async (page) => {

if (!self.extendedMetrics) {
return;
}
Expand Down

0 comments on commit 0f9e351

Please sign in to comment.