简体   繁体   中英

Cypress could not find spec files

I'm trying to run cypress tests inside a docker container.

It works when my test spec files are located inside./cypress folder as cypress looks for default folder(cypress/integration) but it could not find spec files when i use different test spec files path( trying to override default folder);

I'm using below docker command;

docker run -it -v $PWD:/e2e -w /e2e cypress/included:6.2.1 cypress run --config integrationFolder=tests --spec 'tests/spec.js'

ERROR:

Can't run because no spec files were found.

We searched for any files matching this glob pattern:

tests/spec.js

You can use your own test folder path by configuring cypress.json file as below;

{   
    "integrationFolder": "tests"
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM