Replies: 1 comment 3 replies
-
|
This doesn't sound like a legit "environment switch" requirement, but more of a data-driven testing need. Have you looked at the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I’m evaluating Karate v2 for API contract testing and have a question about running the same test suite with different configurations in parallel.
Context
We have:
.featurefiles running against each account typeProposed approach
The reason I am considering this approach is that I want to load the account configurations dynamically from
accounts.json, instead of hardcoding account types in the runner or creating one runner class per configuration. This would make it easier to add, remove, or update account presets without changing Java code.In
karate-config.js, I usekarate.callSingle()to provision the account once per suite using the system properties:Questions
Isolation
Are
karate-config.jsvariables andcallSingleresults fully isolated between separateKarate.run()invocations?For example, if two
DynamicTestentries run concurrently, will each get its owncallSinglecache and config variables?JUnit 5 parallelism
If I enable JUnit 5 parallel execution:
junit.jupiter.execution.parallel.enabled=truewill the two
DynamicTestentries, each callingKarate.run().parallel(5), run concurrently without interfering with each other?Recommended pattern
Is
@TestFactorythe right approach for this use case, or is there a more idiomatic Karate pattern for running the same features against multiple configurations in parallel?Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions