GraalVM (and writing BPMN unit tests in Python / Robot Framework)

Do we have anyone with experience in GraalVM CE? With @Noordsestern we are fan of https://robotframework.org/ for test and task automation, and have been looking for the best way to use Robot Framework for BPMN testing. One option for that is to bridge Robot Framework with Operaton using GraalPython:

With JVM, everything works as expected, but in the best case, this would result in GraalVM CE native image for Robot Framework CLI, with Operaton (or Operaton based project) test dependencies.

Yet, this could be also just wishful thinking. In theory, a good enough reachability-metadata.json should make native compilation possible. But I don’t have experience on generating complex metadata. Also I don’t know if there is are already known blockers in Operaton stack, which simply cannot yet be compiled into “native image”.

So, anyone with experience in GraalVM CE native images and possible tools for metadata generation outside the GraalVM CE core?

Hi @datakurre!

I don’t have any experience with Robot Framework, but some experience with GraalVM polyglot features (I’m on my way to Munich right now to speak about it at a conference, at least :grinning:).

Maybe it’s possible to have a short call about this? I’m not sure I understand all of your plan, yet, but I’m happy to help.

Thanks! I’ll try to explain.

My context is environment, where BPM engine is used in a low-code fashion. Process developers are not Java developers, and processes itself are deployed separately from the engine. Not a process application way. I feel that, in this environment, Robot Framework could be more approachable way for testing processes than Java projects.

Robot Framework is written in python, so technically, I’d like to be able to setup and tear down BPM engine from Python, and also call engine Java API and classes like BpmnAwareTests from Python. One way to do this is to use GraaalVM Polyglot features, especially GraalPython.

Polyglot part already works with JVM. I could probably build a single JAR with both Operaton and Robot Framework dependencies, and only compatible Java runtime would be needed. Unfortunately, it is not very fast.

But then there is native image. It looks tempting. But now comes the hard part: How can I build a native image with compiled code to run arbitrary Robot Framework test suites requiring Engine API and BpmnAwareTests-helpers in the compiled binary. Because none of those are called in my small app that wraps Robot Framework CLI command into main function of the app.

For now, I’ve been learning to use the Tracing Agent to generate reachability-metadata.json with running example Robot Framework test suites, but it does not seem to be good enough out of the box. It can also create trace log, which looks promising, but I have not found tools in CE version to create metadata from the trace log yet.

That’s where I am currently with this :slight_smile: