I have a python script which I run as a test in robot framework. The test is configured to log the stdout and stderr which works fine as long as the test pass but I get no logs when test fails even if the output is printed before the failure.
Is there any way to get the stdout even if the tests fails.
My robot file:
*** Settings ***
Library Process
*** Test Cases ***
First test
${result} = Run Process python createCommunityTest/createCommunityTest.py
Should Be Equal As Integers ${result.rc} 0
Log ${result.stderr}
Log ${result.stdout}
test script snippet
if res.status == 201:
sys.exit(0)
else:
print("ERRRROR")
sys.exit(1)
Run processkeyword orShould be equal as integersfails, the log statements will never run.Should be equal as integers.