Hi team,
Please help to suggest if we can use RobotFramework with Java language, instead of python for automation.
Please share reference link, if it supports.
Hi team,
Please help to suggest if we can use RobotFramework with Java language, instead of python for automation.
Please share reference link, if it supports.
Robot itself will need python to run, consider it as your JVM that you need to have. However there’s GraalVM that’s supposed to allow running Python apps on top of “real jvm”.
Year or two ago i did talk with @pekkaklarck about possibilities of running RF on top of GraalVM but at least at that time, there was some issues with Graal’s xml libraries not being fully compatible on how RF needs them to be.
Anyway, If you just want to implement keywords in java, you can use GitHub - robotframework/jrobotremoteserver: Serves remote test libraries for Robot Framework that are implemented in Java. …
An example of Remote Server library is SikuliLibrary.
Here is my fork of the project, where you can find a newer version of the package:
Based in this comment in robotframework site, i had this query.
Also, As many developers/testers prefer java as language.
The comment still holds true, but not as immediate as in the past. Since the end of Python 2.7, and consequently Jython, can not be used in modern Python 3.x.
That is why the Remote Server is a solution for Java based apps.
Documentation starts here.
As Helio said, that statement is still 100% valid. Core Robot is Python and runs on top of Python but you can write your keywords in any language that can where you can write network code.
You would still be writing the actual test suites and cases in Robot’s own language. And as a tester, I don’t think it’s so universal “testers prefer Java as language”. I definitely don’t and if I had to write my testcases in Java, I’d start looking for a new job or client on the spot. It’s one thing to test apps / services written in Java versus writing also your tests in Java.
For keywords if user wants to use Java language, how it is to be implemented ?
Its not universal, its about the ome of the client we are working with.
Linked earlier already - GitHub - robotframework/jrobotremoteserver: Serves remote test libraries for Robot Framework that are implemented in Java.
There’s example in the repo and wiki gives more details.
Also worth ready is the official docs: Robot Framework User Guide
It’s also possible to use the JPype
package in combination with the DynamicCore
to create a custom Robot Framework (Python) library that gets the keywords from a .jar
file.
The big downside of any keyword implementation in Java is losing the ability to debug / breakpoint / step through the keywords in Java.