我编写了许多赛普拉斯测试,这些测试在我的开发箱上以交互方式运行赛普拉斯时可以通过。我现在正试图让这些相同的测试在詹金斯下自动运行。
我需要能够从命令行执行此操作,但是当我运行以下命令时
cypress run -b electron --spec "path/to/spec"
它仅打开Cypress gui,不运行测试。我以压缩文件的形式下载了赛普拉斯,并且一直以这种方式运行,但我没有通过npm安装它。赛普拉斯为什么不肆无忌running地运行我的测试?
调试日志确实会这样说:
cypress:ts Running without ts-node hook in environment "production"
cypress:server:cypress starting cypress with argv [ 'c:\\code\\Cypress\\Cypress.exe', 'run', '--browser', 'electron', '--spec', 'C:\\code\\Project\\Tests\\IntegrationTests\\cypress\\integration\\*' ]`
cypress:server:args argv array: [ 'c:\\code\\Cypress\\Cypress.exe', 'run', '--browser', 'electron', '--spec', 'C:\\code\\Project\\Tests\\IntegrationTests\\cypress\\integration\\*' ]
cypress:server:args argv parsed: { _: [ 'c:\\code\\Cypress\\Cypress.exe', 'run' ], browser: 'electron', spec: 'C:\\code\\Project\\Tests\\IntegrationTests\\cypress\\integration\\*', cwd: 'c:\\code\\Cypress\\resources\\app\\packages\\server' }
cypress:server:args options { _: [ 'c:\\code\\Cypress\\Cypress.exe', 'run' ], browser: 'electron', spec: [ 'C:\\code\\Project\\Tests\\IntegrationTests\\cypress\\integration\\*' ], cwd: 'c:\\code\\Cypress\\resources\\app\\packages\\server', config: {} }
cypress:server:args argv options: { _: [ 'c:\\code\\Cypress\\Cypress.exe', 'run' ], browser: 'electron', spec: [ 'C:\\code\\Project\\Tests\\IntegrationTests\\cypress\\integration\\*' ], cwd: 'c:\\code\\Cypress\\resources\\app\\packages\\server', config: {} }
cypress:server:appdata path: C:\Users\me\AppData\Roaming\Cypress\cy\production
cypress:server:cypress starting in mode interactive
但我不确定是否相关。