testcontainers-cypress
testcontainers-cypress copied to clipboard
Passing variables from the tests to cypress
Is it possible to pass variables from the test to cypress (somehow get them into the Cypress.env()
or otherwise)? There are a couple of things I will not know until runtime, but that my tests need to have. Thank you!
I am also looking for such a feature, is there a way this can be achieved?
cf. https://docs.cypress.io/guides/guides/environment-variables#Option-3-CYPRESS_
ex.
new CypressContainer()
.withEnv("CYPRESS_MY_VARIABLE", "SAMPLE TEXT")
cy.log(Cypress.env('MY_VARIABLE'))