mercredi 7 juin 2017

Attach process stderr in the case of an error

I am running a bunch of integration tests on a single executable. The program signals an error condition by its return code and might print some (diverse but still useful) output to stderr.

I am currently using the process library as follows:

         ${result} =         Run Process        ${prog}        ${src}
         Should Be Equal As Integers    ${result.rc}    0

This works fine in the case of succeeding tests, but in the case of errors it does not yield any meaningful information. Is there a way to attach the stderr stream to the log file in the case of failing tests? I am reluctant to add in for every test case to not clutter the log file, but if that is the only option, I would appreciate a hint on how to do this the orthodox way as well.

Aucun commentaire:

Enregistrer un commentaire