-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Robot Framework currently silently drops all logs from non-main threads, as documented in the user guide. This can make it difficult to diagnose test failures when multiple threads are involved, even with the use of the robotbackgroundlogger
.
For example, testing an application which makes requests (e.g. HTTP requests) to a server, where a dummy server is run as a separate background thread by the test framework (for tracking, inspecting and validating requests, producing dummy responses etc.), it would be really helpful to have logs from the server able to be logged to the same file(s) as the Robot tests and test infrastructure themselves, in the order they were logged by the respective threads. This would make it much easier to be able to correlate the logs from the different threads and quickly identify where failures are occurring.
The key thing doing this "natively" in robotframework
gives (rather than via robotbackgroundlogger
) is that this is immediately usable by all users of the framework, and doesn't require specific additional implementation by users. It also means the logs from the various threads are correctly interleaved in the order they were logged, whereas the robotbackgroundlogger
logs the stored logs from background threads at a later point in time, requiring more steps to be able to reconstruct events.
This issue initially tracks just implementing this for the debug file (so that there is at least one method for getting these logs), however it would be beneficial to extend this to all log files if possible.
An initial attempt at fixing this issue (for the debug file only) is in #3917.