cucumber-cpp icon indicating copy to clipboard operation
cucumber-cpp copied to clipboard

Logging of Test execution in QTTestDriver verbose mode

Open kreuzberger opened this issue 1 year ago • 2 comments

🤔 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

  • provided as "description" as part of the InvokeResult::success() like for the other Resulttypes
  • the description should be logged out in case of the verbose flag enabled.

⛏ 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

kreuzberger avatar Jul 30 '24 06:07 kreuzberger

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

ursfassler avatar Aug 01 '24 13:08 ursfassler

  • During development of tests i want to see whats going on without always to fail the tests.
  • For review / explanation in team i want to show the test execution

kreuzberger avatar Aug 01 '24 14:08 kreuzberger