Provide a way to get the debug logs of failing tests
Sometimes my tests are failing when they run during the automated run at night, but, when I log in and run the tests manually, they pass. I can see the failure stack trace, but I was wondering if there is any way to keep/view the debug logs from the failed tests so I can try to understand why they fail at night, but work during the day?
-
[Deleted User] commented
This issue also occurs during validation runs in Pipelines. I'd be happy if I could a) specify the log levels (apex info, db info, etc) + b) enumeration of the failing tests so I could rerun the validation and capture just the debug logs I care about.
Turning debug logs on unconditionally for the unit test or validation jobs is not desired as they can cause the runs to exceed CPU time.
Even cleverer would be for Gearset to identify the failing tests and rerun those with pre-configured debug logging so results would be available for inspection