running several playwright load tests at the same time (or in sequence) #3399
zoe-jobson-IL
started this conversation in
Artillery
Replies: 2 comments 1 reply
-
I am also doing something similar. Having the ability to just say run all tests X number in a round robin would be way better than the current system where it is all random. |
Beta Was this translation helpful? Give feedback.
0 replies
-
There are two ways to do this:
scenarios:
- engine: playwright
weight: 1
testFunction: "platformNavigation"
- engine: playwright
weight: 2
testFunction: "appsec"
- engine: playwright
weight: 3
testFunction: "bookmarking" The weight config above would make Artillery:
(weights are relative to each other, and are probabilistic so the numbers won't be exact)
import { scenario as platformNavigation } from "@/tests/artillery/platform-navigation.art";
import { scenario as appsec } from "@/tests/artillery/app-sec.art";
async function runInSequence(page) {
// We're passing the same page object here so there should be no issues with reusing the same browser instance
await platformNavigation(page);
await appsec(page);
}
export const runInSequence; scenarios:
- engine: playwright
testFunction: runInSequence |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a number of playwright load test that we want to reuse for a nightly performance test, so far I have this
and this
the trouble is that the way multiple scenarios works means that I often get one of the scenarios picked 3 times and another not picked at all, which means that ensure stats that are based off the not-picked one fail because they don't get triggered.
Is there are way of telling the artillery runner that I want exactly N versions (e.g. 1 or 3 or whatever) of each scenario to run, or failing that a way I can run them in sequence, I tried changing my import/exporter to run them, but obviously I lose the browser between scenarios, though it did run the first in the list.
Beta Was this translation helpful? Give feedback.
All reactions