-
Notifications
You must be signed in to change notification settings - Fork 515
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3436 from artilleryio/feat/playwright-tests-as-code
- Loading branch information
Showing
14 changed files
with
230 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
examples/browser-load-testing-playwright/browser-load-test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { checkOutArtilleryCoreConceptsFlow } from './flows.js'; | ||
|
||
export const config = { | ||
target: 'https://www.artillery.io', | ||
phases: [ | ||
{ | ||
arrivalRate: 1, | ||
duration: 10 | ||
} | ||
], | ||
engines: { | ||
playwright: {} | ||
} | ||
}; | ||
|
||
export const scenarios = [ | ||
{ | ||
engine: 'playwright', | ||
name: 'check_out_core_concepts_scenario', | ||
testFunction: checkOutArtilleryCoreConceptsFlow | ||
} | ||
]; |
27 changes: 27 additions & 0 deletions
27
examples/browser-load-testing-playwright/browser-smoke-test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { checkPage } from './flows'; | ||
export const config = { | ||
target: 'https://www.artillery.io', | ||
phases: [ | ||
{ | ||
arrivalCount: 1, | ||
duration: 1 | ||
} | ||
], | ||
payload: { | ||
path: './pages.csv', | ||
fields: ['url', 'title'], | ||
loadAll: true, | ||
name: 'pageChecks' | ||
}, | ||
engines: { | ||
playwright: {} | ||
} | ||
}; | ||
|
||
export const scenarios = [ | ||
{ | ||
name: 'smoke_test_page', | ||
engine: 'playwright', | ||
testFunction: checkPage | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.