How to provide an external Script in Camunda Assert

I have the following Test:

  @Test
  @Deployment(resources = Array(
    "_generated/bpmn/scripts/form-json.groovy",
    "_generated/bpmn/ChangeAddressTest.bpmn"
  ))
  def testHappyPathTest(): Unit {
 ...

When running my test, I get the following exception:

Unable to find resource at path deployment://scripts/form-json.groovy

How is this tested, I did not find an example with external scripts.

Hi @pme123,

when you deploy the scripts into the database, the path will only be used to reference the source file you add to the deployment. It’s not used to reference the script from the deployment.

You should try it with

deployment://form-json.groovy

Hope this helps, Ingo

2 Likes