When I run the project , I get the below error:
Tests in error:
testHappyPath(com.camunda.demo.simpleDemo.ProcessUnitTest): Unknown property used in expression: #{weatherOK}. Cause: Cannot resolve identifier ‘weatherOK’
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project simpleDemo: There are test failures.
Any suggestion of how to fix it?
Thanks in advance
the error message says that there is a problem with the expression #{weatherOK}. Is the variable weatherOK created in your test and has the value true? Make sure that the test has the information once it arrives at the point where the expression is evaluated.
Thank you. the variable is set in the execute method : @Override
public void execute(DelegateExecution execution) throws Exception {
// TODO Auto-generated method stub
Random rando=new Random();
execution.setVariable(“weatherOK”, rando.nextBoolean());
}