cucumber / cucumber-cpp

Support for writing Cucumber step definitions in C++
MIT License
308 stars 131 forks source link

Logging of Test execution in QTTestDriver verbose mode #304

Open kreuzberger opened 3 months ago

kreuzberger commented 3 months ago

πŸ€” What's the problem you're trying to solve?

Currently if the steps run without any problems, the output from the test could not be logged or seen. The output is stored in a file that is removed after test and does not contain helpful information on success cause no loglevel is provided to the test

✨ What's your proposed solution?

The verbose flag or another flag should be provided to the TestDriver implementation. The testdriver should then configure the tests with the appropriate, driver specific loglevels. The output of the test could be

⛏ Have you considered any alternatives or workarounds?

The logging could be done in the steps implementation by NOT using the QT macros qInfo() or by providing an messagehandler for this. Long text short: logging to stderr is possible and output from stderr is shown. This could also a way to enable logging. But in failure cases the context of these logs and the steps executions do not match. This might not be helpfull.

πŸ“š Any additional context?

No response

ursfassler commented 2 months ago

This sounds reasonable. Do you have a concrete use case where you need this? It is to better understand how it will be used.

kreuzberger commented 2 months ago