Getting Pass/Fail result after RF execution

Hi Brendan,

As always is the case in IT, there are many options and no right or wrong way, it’s really a matter of what works best for you.

Options you have (in order mentioned):

  1. parse the robot results files (like you are doing) this is actually how I started with RFSwarm too. are you parsing the log.html or the output.xml file, the xml file is easier as you can use xml libraries to convert the xml to a dictionary that is easy to iterate.
    [Pro: can use any programming language you like / Con: need to wait till after execution then run a seperate process]

  2. As @ericbjones mentioned you can create a keyword and call it as a teardown
    [Pro: same robot keywords as your test case so no need to learn anything new]

  3. Use robot framework’s listener api to report results as they happen (this is what RFSwarm uses now)
    [Pro: transparent to your test cases, so can be controlled at runtime if enabled or not, also can post passes to your issue tracker while next test continues to run / Con: need to write listeners in python or java]

There may also be other options but those are the ones I know.

Don’t be ashamed, any script that works for you is better than repetitively doing manual steps and everyone needs to start somewhere and practical exercises like this are a great way to learn programming.

Dave.

1 Like