Hello, I am trying to build a testing suite projec...
# help
t
Hello, I am trying to build a testing suite project for multiple websites where I can have a config with environment variables set per project. I'd like to be able to then execute the tests for a given website by using the UI. I could not find how to do this and I have several other small questions. Is there anyone offering some tutoring who could walk me through setting this up and answering some questions for an hour? I would pay for this Thank you!
f
To clarify: are you talking about having one repo thats contain specs for multiple sites and you only want to run some of them based on an environment variable?
t
Yes, I am having a project containing a folder structure /clients/clientA/config/env.production.json, client.json, env.development.json /clients/clientA/fixtures, /clients/clientA/integration etc. I setup a script in /cypress/plugins/index.js which goes and loads the correct client config and env. from the call npx cypress open --env config="clientA",mode="production" This already works. Now there's certain tests which several clients reuse and I am non very confident about how to make this somewhat dynamic. Running "standard" tests and client-specific tests.
f
you could tag your tests and then only run a certain subset based on that env variable -- something like this: https://github.com/annaet/cypress-tags
t
this is great advice, thank you!