Package org.flowable.engine.test
Annotation Interface Deployment
Annotation for a test method to create and delete a deployment around a test method.
If no 'resources' or 'extraResources' are set, the current package, test class name and test method are used to find the test resource (see example below).
Usage:
package org.example; ... public class ExampleTest { @Deployment public void testForADeploymentWithASingleResource() { // a deployment will be available in the engine repository // containing the single resource org/example/ExampleTest.testForADeploymentWithASingleResource.bpmn20.xml } @Deployment(resources = { "org/example/processOne.bpmn20.xml", "org/example/processTwo.bpmn20.xml", "org/example/some.other.resource" }) public void testForADeploymentWithASingleResource() { // a deployment will be available in the engine repository // containing the three resources } @Deployment(resources = { "org/example/processOne.bpmn20.xml" }, tenantId = "example") public void testForATenantDeploymentWithASingleResource() { // a deployment will be available in the engine repository // containing the single resource for the specified tenant }
- Author:
- Dave Syer, Tom Baeyens, Tim Stephenson, Joram Barrez
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionString[]
Specify resources that are extra, on top of the automatically detected test resources.String[]
Specify all the resources that make up the deployment.Specify tenantId to deploy forboolean
Whether the model should be validated during deployment.
-
Element Details
-
resources
String[] resourcesSpecify all the resources that make up the deployment. When using this property, all resources should be passed, as no automatic detection will be done.- Default:
- {}
-
extraResources
String[] extraResourcesSpecify resources that are extra, on top of the automatically detected test resources. This is for example useful when testing a BPMN model with a call activity and the called process definition needs to be included too. When using the 'resources' property, both should be passed. With this property, only the called process definition needs to be set.- Default:
- {}
-
tenantId
String tenantIdSpecify tenantId to deploy for- Default:
- ""
-
validateBpmn
boolean validateBpmnWhether the model should be validated during deployment. Defaults to true. Useful to suppress validation to assert on runtime errors occuring when invalid models are being executed.- Default:
- true
-