Expanding on Robot Framework with Java

Im doing a project for my company where we are developing a new test automation tool as a proof of concept. The goal of this project is to improve the portability from project to project. So that you can set this product up quickly in the context of a DevOps pipeline. Another goals is that the testcases have to be human-readable so that non-technical testers (who can’t program) are able to use the tool.

Now for my questions:

  • How feasable do you think building a shell around RFW like this is?
  • Are there other test engines that might be better?
  • What is the best way (and how) to interface RFW with Java?
  • Are there comparable tools that do this already and if so how well do they do it?
  • Are there limitations of RFW that i should know about? what about 2FA? Javascript popups?

Thanks in advance!

Hi Gijs,

For a POC I would suggest you Keep It Simple, just use the stock Robot Framework Functionality and configure your CI/CD pipeline to just run robot from the command line for the tests.

I’ll try to answer your questions:

  • How feasable do you think building a shell around RFW like this is?

The first question I’d ask you around this is what do you need that robot framework doesn’t already do? when you know the answer to that you’ll know what components you need to write.
From there I would say, for an experienced programmer it shouldn’t be hard, the documentation on how to interface to RF is quite good see:

  • Are there other test engines that might be better?

I don’t know of any, I was developing a generic test framework designed for non programmers, and when I saw robot framework I stopped because RF is so good that it would be decades for me to even come close to matching it, I have not seen any other test automation tool (commercial or open source) that comes close.

  • What is the best way (and how) to interface RFW with Java?

The API documentation I linked above has the Java entry points

  • Are there comparable tools that do this already and if so how well do they do it?

As I said I don’t know of any test automation tool that even come close to RF (Obviously personal opinion) and for DevOps pipeline integration it depends on what you are using, the simplest method is just trigger robot from the command line, but there are integrations already for many of the popular tools google your tool and robot framework and see what comes up.

  • Are there limitations of RFW that i should know about? what about 2FA? Javascript popups?

Things like 2FA and Javascript popups are not any harder to deal with in RF than other tools, in many ways it’s easier as RF has access to so many libraries the likelihood that you’ll be able to automate these is higher.

  • Things like recapture are not really automate-able in any tool because they have been specifically designed to avoid this. But this should not really be enabled in your test environment anyway, only in your production system.
  • 2FA systems like email or SMS should be easy enough to automate with, you might need to make some custom python keywords but python libraries like poplib or imaplib mean this shouldn’t be too hard

As I mentioned earlier, keep you POC simple, the RF robot command can be configured to run all robot files in a directory, so I would suggest you start by creating a tests directory in your project’s version control system and then configure your CI/CD pipeline to run robot with all the robot files in that directory, and check the return status code from robot (0 = all tests passed). Then you can just check in robot files into the tests directory of your version control system as you expand the tests for your POC. I would leave doing anything more fancy than that till after the POC but keep notes of what’s possible so you can work with your team to decide which things you want to implement.

Hope this was helpful,

Dave.

Relating to the Java aspects, and CI, there is a maven plugin for RF, and you can run Java code/libraries with/against RF using the Java Remote Library server interface, for cases where you can’t run (or can’t run well) Java with RF via the Jython interface.

Also, in terms of CI dependencies and deploying RF to new projects with minimal setup, including the CI part, the docker projects for RF (if you search online) may be useful to use.

1 Like