https://cypress.io logo
Let CI Run component tests?
# i-need-help
b
Hello, I can't seem to find docs or guidance on how to add my Cypress components tests to my Gitlab CI. I can't even find a package-json command to just run the tests anywhere on the web. I think I am misunderstanding something, can someone explain how I can run my tests?
m
Hi @broad-wire-63018 There is a GitLab CI example on https://github.com/cypress-io/cypress-example-kitchensink/blob/master/basic/.gitlab-ci.yml You would need to replace
- npm run e2e:record
by a call to your Cypress component test script.
b
Ah. I don't use e2e yet. I am just doing component testing. I found out that running cypress run --component does what i want it to do
So it's resolved! :D
m
Yes, you need `--component`whether you are running locally or on GitLab.