我正在使用testcafe-reporter-html从testcafe测试运行中生成报告,并使用上面链接中提供的文档进行说明。
第二步说$ testcafe chrome test_folder/ --reporter html
但是,这导致以下错误
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-e2e@1.0.0 test:debug: `testcafe chrome test_folder/ --reporter html:/path/to/test_folder/report.html`
npm ERR! Exit status 1
test_folder
内几乎没有测试文件。没有一个运行。
但是,当我使用以下命令运行单个测试时:
$ testcafe chrome test_folder/my_favorite_test.spec.js --reporter html
运行完成并发布报告。
这里的一些专家可以帮助我确定我的步骤是否正确地遵循了文档,或者出现此错误的原因是什么?
答案 0 :(得分:1)
您将需要通过通配符提供一个或多个文件的路径。像这样:
$ testcafe chrome test_folder/*.js
答案 1 :(得分:0)
下面的命令对我来说很好:
private async Task DeleteItems()
{
// Construct the HTTP Request but DO NOT execute it just yet
var deleteListItemsRequest = graphServiceClient
.Sites[siteUrl]
.Lists[listName]
.Items
.Request(deleteQueryOptions);
// This loop is for iterating over the pages
do
{
// Populate the page by executing the HTTP request
var deleteListItemsPage = deleteListItemsRequest.GetAsync();
// Iterate over the current page
foreach (var listItem in deleteListItemsPage.CurrentPage)
{
// Execute the delete and wait for the response
await graphServiceClient
.Sites[siteUrl]
.Lists[listName]
.Items[deleteItem.Id]
.Request()
.DeleteAsync();
}
// Check for additional pages
if (deleteListItemsPage.NextPageRequest != null)
{
// If we have an additional page, assign it to the
// same HTTP Request object. Again, we DO NOT execute
// yet. It will get executed at the top of the loop
deleteListItemsRequest = deleteListItemsPage.NextPageRequest;
}
else
{
// If we don't have an additional page, set the current
// request to null so we can use this to trigger an exit
// from the loop
deleteListItemsRequest = null;
}
// Check if we have a Graph request, if not break out of the loop
} while (deleteListItemsRequest != null);
}