cancel
Showing results for 
Search instead for 
Did you mean: 

Unit Testing Plugins Only

tpanagos
Champ in-the-making
Champ in-the-making
I am looking for a light-weight strategy for doing unit tests for a growing library of Activiti plugins that we are developing. Ideally we could exercise the plugin outside of a process instance to keep the overhead for writing the units low and keep the process concerns separated.

I know that we have the code for general process unit tests from: https://forums.activiti.org/content/sticky-how-write-unit-test. This involves setting-up and running a process which, naturally,  can include servicetask entries using plugins. However, it is a little heavy-weight for unit testing plugins themselves.

I have been playing around with creating a light-weight DelegateExecution to fire with a plugin in isolation from a process. I have not found an easy way to do this because the Execution implementation all seem to require an existing Context.

Has anyone made a stub implementation for a Delegate that maybe only handles input parameters and getVariables behaviors that does not require the full context?

Any thoughts?
Thanks,
Tim
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
No, I'm afraid I haven't seen anything like that …
Then again Activiti boots up very fast, especially when running h2 in mem … maybe you don't need all of that?