Manual Testing of any workflow in Flowable

How can we write test cases for any workflow in Flowable? I need to perform manual testing first and then automate them.

Hi Anansha.

There are many possibilities, just two of them:

  1. jUnit tests - There are plenty of jUnit tests in the flowable source which you can use as an example.
  2. use processes to test processes (as we are using java in the jUnit tests to test java program)
    https://gromar01.wordpress.com/2017/05/16/flowable-process-testing-for-modelers/
    https://gromar01.wordpress.com/2017/10/05/process-tests-without-side-effects/ - implementation is not merged into master branch, but you can use the idea. The tests can be automatically generated from the events you did during manual testing.

Regards
Martin

1 Like

Hi Martin,

Thanks for the quick reply.

Can you give an example for any manual test case for flowable?
Actually I need to automate the test cases using selenium so I need to write manual test cases for it first.

Thanks and Regards,
Anansha Asthana

Hi,

Manual test case

  1. start a process (oneTaskProcess)
  2. claim and complete user task
  3. assertThat process instance is finished

Regards
Martin

Hi Martin,

Thanks for the reply.

How can we perform negative testing on this?

Thanks and Regards,
Anansha Asthana

Hi,

* start a process (oneTaskProcess)
* claim task to `user1`
* complete try to complete task with `user2`
expected behavior is to throw an exception.

this case test flowable functionality. If you want to test your business logic, you have to add it into test.

Martin

Hi,

I have a query for the negative test case above:

If ‘user1’ will claim a task, that particular task will be assigne dto ‘user1’, then how would ‘user2’ will see that task.

It would be visible to admin only and the user who has claimed that.

So how is this negative test case.

Anansha Asthana

When a task is visible only for user1 it does not mean that user2 can’t try to complete it.
I am right?

Martin

Hi,

I think that depends whether it is assigned to a group of candidates or an individual.

Anansha Asthana

Hi Martin,

Can I use Selenium for automation testing of the process in Flowable?

Thanks
Anansha Asthana

Hi Anansha.

Yes you can. It depends on what you want to test. I would expect, that you can test UI with Selenium.
The approaches, which I mentioned above, are focused on the process testing.

Regards
Martin

Hi Martin,

I have to run the “https://github.com/martin-grofcik/flowable-engine/tree/process-test” this branch to use the functionality of “Create Process Test”. How should I run it ? I mean I already have a set up of the previous version of flowable.Is there any other way so that I can use it?

Thanks
Anansha

Can Camel Test be used for process testing in flowable?

Sure,

just build the flowable-modeler and flowable-task wars with mvn clean install -Pdistro -DskipTests=true

Regards
Martin

Hi Martin,

I was exploring the ways to perform automation testing of the processes in Flowable and I have been reading this link of yours https://gromar01.wordpress.com/2017/04/19/flowable-semi-automatic-process-testing/.
I have few queries regarding this:

  1. How we will link the automated code with flowable modeler as we have to automate those processes only that we make in modeler.

  2. I have gone through the source code of [OneTaskProcessTest.java](https://github.com/martin-grofcik/flowable-engine/blob/25d9e062b1468cdb2037f800779412e19742e5fd/modules/flowable-engine/src/test/java/org/flowable/examples/test/OneTaskProcessTest.java using this link.
    Are there the 3 ways of writing the automation code for this or we have to use any one from above link.

I am little bit confused over here.It would be great if you can help.

Thanks
Anansha Asthana

Hi Anansha,

The process test is generated from the events logged in the event log. Generated process test is a process model again so you can edit it in the modeler.
If you want to run the test you have to deploy it and run it again in the process engine.

I don’t understand the question. Would you rephrase it please?

Regards
Martin

Hi Martin,

In OneTaskProcessTest.java, I can see n number of ways of automation code.

So from there we have to pick 1 way or that whole is one code only.

Thanks
Anansha