AnsweredAssumed Answered

Unit Testing Plugins Only

Question asked by tpanagos on Feb 1, 2016
Latest reply on Feb 5, 2016 by jbarrez
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

Outcomes