Javascript Can';我不能运行我的测试。代码和包Json看起来是正确的
刚开始在TestCafe接受新工作的培训 由于某种原因,我不断地出现以下错误,我不知道为什么Javascript Can';我不能运行我的测试。代码和包Json看起来是正确的,javascript,testing,e2e-testing,testcafe,browser-automation,Javascript,Testing,E2e Testing,Testcafe,Browser Automation,刚开始在TestCafe接受新工作的培训 由于某种原因,我不断地出现以下错误,我不知道为什么 ERROR The specified glob pattern does not match any file or the default test directories are empty. Type "testcafe -h" for help. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! testcafe_training@1.0.
ERROR The specified glob pattern does not match any file or the default test directories are empty.
Type "testcafe -h" for help.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! testcafe_training@1.0.0 test: `testcafe chrome ./test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the testcafe_training@1.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xx.xxx/.npm/_logs/2020-01-17T15_15_38_725Z-debug.log
xxx.xx@LPGxxx TestCafe_Training %
下面是代码和package.json
代码:
Fixture`Testcafe入门`
.第页`https://devexpress.github.io/testcafe/example/`;
Test('My first testcafe Test',async t=>{
//在这里输入您的测试用例
等待t.typetext(“#开发者名称”、“玛丽”);
等待t。单击(#提交按钮”);
});
package.json:
{
"name": "testcafe_training",
"version": "1.0.0",
"description": "This is training",
"main": "TestCafeTrain.js",
"scripts": {
"test": "testcafe chrome ./test"
},
"keywords": [
"TestCafe",
"Automation",
"Testing"
],
"author": "",
"license": "ISC",
"dependencies": {
"testcafe": "^1.7.1"
}
}
好吧,我知道我做错了什么
运行此代码后,它工作正常如果您阅读了错误,您将看到它不工作的原因。您还没有告诉TestCafe您的测试位于何处。这是否回答了您的问题?