-
Notifications
You must be signed in to change notification settings - Fork 676
Closed
Labels
AREA: serverFREQUENCY: level 2SYSTEM: runnerTYPE: enhancementThe accepted proposal for future implementation.The accepted proposal for future implementation.
Milestone
Description
Feature Request
Provide a way to pass configuration from Runner to test fixtures.
What is the current behavior?
There is no way to pass any information from the TestCafé runner to the actual tests.
What is the expected behavior?
For our use case, we want to provide different configuration from various sources to the tests on a per-execution basis. This means that e.g. configuration files as proposed here are not a viable option.
It would be great, if you could pre-fill the fixture context fixtureCtx from the TestCafé runner, like so:
const tc = await createTestCafe();
const runner = tx.createRunner();
await runner
.src(myFiles)
.browsers(myBrowsers)
.fixtureContext({
mySetting: getSomeValueSomehow()
})
.run();resulting in this test fixtures:
fixture("My fixture")
.before(fixtureCtx => {
// fixtureCtx now equals
// {mySetting: ...}
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
AREA: serverFREQUENCY: level 2SYSTEM: runnerTYPE: enhancementThe accepted proposal for future implementation.The accepted proposal for future implementation.