A step-by-step guide to logging Robot Framework RPA events and failures to Bugsnag

Illustration adapted from the original by Robocorp.

Project set up

The rest of this tutorial will expand on the Web store order robot tutorial by Robocorp, and I will assume you’re starting where that project left off.

Connecting to Bugsnag

You will first need to create a new account at Bugsnag.

Preparing the context

Bugsnag allows us to group all our events into any categories that make sense to our business. In our case, the most logical unit is the processed Order.

Logging events

To log events from Robot Framework, we need to define a new keyword in Python that takes some arguments, and CURRENT_ORDER_ID and sends them over to the generic log_to_bugsnag function we defined earlier.

Robot Framework RPA events grouped in Bugsnag
RPA event details in Bugsnag

Logging Robot Framework errors

What we have so far works great on successful runs, but if the robot runs into a fatal failure, the log will simply cut off at its last event.

Robot Framework exceptions in Bugsnag

Error notifications

Note the red dots on the right. We’ve set the severity of events passed from our listener to the error level. You can use these to filter a view in Bugsnag, or schedule automatic email and Slack notifications.

Daily summary email from Bugsnag.

Conclusion

Robocloud is a young and quickly evolving project, and I’m sure more nuanced logging and reporting tools are in the works.

Liked this post? Follow me on 🐦Twitter @seifip

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Philip Seifi

Philip Seifi

Founder https://colabra.app | Cross-pollinating between industries and cultures. | Nomad entrepreneur 🌎 designer 🌸 hacker 💻 | https://seifi.co