[docs] add documentation for API usage of userVariables #7896
Copy link
Copy link
Open
Labels
AREA: docsAn issue related to the product documentation.An issue related to the product documentation.TYPE: enhancementThe accepted proposal for future implementation.The accepted proposal for future implementation.
Description
Activity
- addedTYPE: enhancementThe accepted proposal for future implementation.The accepted proposal for future implementation.
on Jul 24, 2023 - addedSTATE: Need responseAn issue that requires a response or attention from the team.An issue that requires a response or attention from the team.
on Jul 24, 2023 Hi @htho,
Thank you for informing us about this issue. We'll investigate it and update this thread once we have news.
- removedSTATE: Need responseAn issue that requires a response or attention from the team.An issue that requires a response or attention from the team.
on Jul 25, 2023 - addedAREA: docsAn issue related to the product documentation.An issue related to the product documentation.STATE: Need responseAn issue that requires a response or attention from the team.An issue that requires a response or attention from the team.and removedSTATE: Need responseAn issue that requires a response or attention from the team.An issue that requires a response or attention from the team.
on Jul 25, 2023 - addedAREA: docsAn issue related to the product documentation.An issue related to the product documentation.and removedAREA: docsAn issue related to the product documentation.An issue related to the product documentation.
on Feb 12, 2025
Metadata
Metadata
Assignees
Labels
AREA: docsAn issue related to the product documentation.An issue related to the product documentation.TYPE: enhancementThe accepted proposal for future implementation.The accepted proposal for future implementation.
What is your Scenario?
I was looking for a way to inject
userVariables(introduced in v1.16.0) when I start TestCafe via the js API.The only documented way to use them is via a configuration file.
I did not find any documentation about JS API usage, but this comment by @Artem-Babich in #2431:
This is exactly what I was looking for.
It works, although it is a little awkward because all other configuration goes to the runner (and therefore
RunOptions).What are you suggesting?
For API / TestCafe API / Global / createTestCafe() # options
For API / Configuration File # User Variables
For /ts-defs-src/runner-api/configuration.d.ts
userVariables: UserVariablesWhat alternatives have you considered?
I can add a file like
testcafe.global.tc.ts:Additional context
No response