I have several testcases and I want to get the result of each one of them (PASS or FAIL) and save it in a .txt file. Is it possible to do it?
This is very similar to your description:
Robot Framework API | ROBOT FRAMEWORK
You can use the Robot Framework API to easily parse the Execution Result file and get the information you want.
Hi Carlos,
There are many ways this could be achieved, including using the API as Many mentioned above, using Listeners (like I do in rfswarm)
But probably the easiest way is to simply create a keyword for logging the test result and call it with a Test teardown.
Your keyword would combine the Automatic variables ${TEST STATUS}
and ${TEST MESSAGE}
with Append To File to write the text file.
You might find other Automatic variables useful too, e.g. ${SUITE NAME}
might be useful for the filename of the text file you want to create.
You may also want to log the ${SUITE STATUS}
and ${SUITE MESSAGE}
to the same file from a Suite teardown
Dave.