【发布时间】:2019-08-22 20:30:36
【问题描述】:
我需要使用 TestRail API 将 puppeteer-jest 测试框架与 TestRail 集成。但为此,我需要知道哪些测试失败了,哪些测试通过了
我在官方 GitHub 存储库和 Jest 站点中搜索一些信息。但没什么。
测试:
describe('Single company page Tests:', () => {
let homePage;
beforeAll(async () => {
homePage = await addTokenToBrowser(browser);
}, LOGIN_FLOW_MAX_TIME);
it('Open the company page from the list', async done => {
await goto(homePage, LIST_PAGE_RELATIVE_PATH);
await listPage.clickSearchByCompanyName(homePage);
await addCompanyNamePopup.isPopupDisplayed(homePage);
await addCompanyNamePopup.fillCompanyName(homePage, companies.century.link);
await addCompanyNamePopup.clickNext(homePage);
await addCompanyNamePopup.fillListName(homePage, listNames[0]);
await addCompanyNamePopup.clickSave(homePage);
await addCompanyNamePopup.clickViewList(homePage);
const nextPage = await clickCompanyName(homePage, browser, companies.century.name);
await companyPage.isOverviewTabPresent(nextPage);
await companyPage.isPeopleTabPresent(nextPage);
await companyPage.isSocialTabPresent(nextPage);
await companyPage.isFinanceTabPresent(nextPage);
await companyPage.isLeaseTabPresent(nextPage);
await homePage.close();
done();
});
}
我希望获得所有通过和失败的测试用例名称,并将其与测试用例的名称及其结果一起写入 JSON。 其实我什么都没有。
【问题讨论】:
标签: javascript json jestjs puppeteer