-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
7.16
Node.js Version
18
Mode
WDIO Testrunner
Which capabilities are you using?
{
// ...
reporters: [
['spec', { realtimeReporting: true
]
}What happened?
With cucumber hooks (Before(...), etc...) the spec-reporter with realtimeReporting enabled spits logs that look like Hook executed : with no additional context. For folks who have a bunch of hooks like myself, it ends up creating a lot of low-value noise.
The log comes from the following line, as introduced in #7572
https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-spec-reporter/src/index.ts#L151
What is your expected behavior?
I see two approaches to better behavior:
-
Empower adding of a
Hook.titleto cucumber hooksExperimentally, I tried a number of approaches to this, but no solution presented itself. Apologies if I missed something.
-
avoid logging at all if a title isn't present
The 2nd option is something I'd personally be willing to implement and PR. For 1), I couldn't easily trace the code to that point, so I'm not immediately clear on how to tackle it.
How to reproduce the bug.
With a cucumber project, set a Before hook, and use the spec reporter as described above. Run the tests.
Relevant log output
Hook executed :
Hook executed :
Hook executed :
Hook executed :
Hook executed :
Hook executed :
...Code of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues