简体   繁体   中英

how to change the test file run order in cypress in run time

I have 3 different test files

1- testfile-1.js 2- testfile-2.js 3- testfiles-3.js

i can change the test file running order using testfiles feature in cypress.config file but i want to change the order runtime not hard coded.

looking for the solution

Regards

Change the file name to something like this in case you don't want to use testFiles: [] in your cypress.config .

01-testfile.spec.js
02-testfile.spec.js
03-testfile.spec.js

You can comma-separate the file names on the command line,

yarn cypress run --spec "testfile-1.js,testfile-2.js,testfiles-3.js"

Not sure if that guarantees the order though.

If no luck with that, it would be possible to guarantee the order by running with a special script (but it's more work).

i found a way

{
"chromeWebSecurity": false,

}

paste this in cypress.json and it will allow the external iframes to work in cypress

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