Closed KiT-Maverik closed 5 years ago
See https://github.com/webdriverio-boneyard/wdio-allure-reporter/issues/112.
Custom start\stop steps implemented in v5 reporter.
Thanks for such operative answer @BorisOsipov I've read carefully issue, you sent. I see that createStep API has all arguments necessary, but I still can't understand how I should pass information to it. Would you be so kind to give me a little example where result of browser action is reported as a part of a step and step status is dynamically defined accourding to call results.
Something like this very abstract example:
Something like
reporter.step('thisIstitle', () => {
browser.click(selector);
})
In fact most important sentence from #112 thread was
Can I use the createStep function that is defined in mocha-allure-reporter API? No
So you can not write
Something like
reporter.step('thisIstitle', () => {
browser.click(selector);
})
You can not pass callback to reporter.step function.
Would you be so kind to give me a little example where result of browser action is reported as a part of a step and step status is dynamically defined accourding to call results.
I don't have such example for js. There is no common solution. You may create some typescript decorator, but is not solution for js :(
@BorisOsipov Pitty. But I already found a walkaround using conditional afterTest expression. But I'm running into another problem. Can you tell me, is it possible to use image in createAttachment API? If yes, give me please an example. SOLVED: used 'browser.browser.saveScreenshot()' in 'content' argument. Anyway, thanks for your support.
hey there. Would you be so kind to advise how to use createStep API? In other allure reporter implementations *step API has "stepFn" argument intended to store commands, which will be reported as a part of a step. But your "createStep" API arguments are all of string type. Im' confused, - how should I associate actions with particular step?
Please see some illustrations below: I wanna to configure my instance to bee smth like this live example (wdio-allure-ts used) - result of specific actions is reported as a part of a step.