Можно ли сделать скриншоты отчета wdio allure между шагами и как группировать тестовые наборы в wdio, например, группировать в selenium?

#report #webdriver-io #allure

Вопрос:

Я использую отчеты allure для создания отчета для моего теста wdio. Я могу делать скриншоты и добавлять шаги в выполняемое тело теста.

Мой вопрос в том, можно ли сгруппировать тестовые наборы, как мы делаем в selenium, и добавлять скриншоты к каждому шагу в отчетах?

Изображение

Файл спецификации

 it('with valid user credentials', async () =>{
    await landingScreen.tapSignIn();
    await screenShots.captureScreenShot(filePath, "OnboardingScreen.png")
    await loginScreen.waitForSignInShown();
    await screenShots.captureScreenShot(filePath, "LoginScreen.png")
    await expect(loginScreen.viewText).toBeDisplayed();
    await loginScreen.waitForUsernameTextField();
    await loginScreen.getHelpText();
    await loginScreen.getLoginText();
    await loginScreen.login(userName, password);
    await screenShots.captureScreenShot(filePath , "logincredentials.png")
    await tabs.tapAccounts();
    expectChai(await loginScreen.getLoginText()).to.equal("* Cell Number");
    await myAccounts.tapCloseIcon();
    browser.pause(2000);
    await mobileGestures.scrollUp();
    await myAccounts.tapSignout();
    await myAccounts.tapSignoutOk();
})
 

файл подкачки

 async login(userName, password) {
    await this.spinner.waitForDisplayed({timeout:20000, reverse: true, timeoutMsg: 'Spinner is still exists' })

    try {
        await this.wait_till_screen_displayed
        allureReporter.addStep("Enter user name");
        await this.inputUserName.setValue(userName);
        allureReporter.addStep("Enter password");
        await this.inputPassword.setValue(password);
        await this.keepMeSignedIn.click();
        await this.signInButton.click();
    } catch (error) {
        console.log(error   "This to catch the error")
    }  
}    
 

Комментарии:

1. не могли бы вы добавить код, который вы используете для этого ?

2. @PDHide, я добавил свою часть кода в описание. Не могли бы вы, пожалуйста, проверить это?