Created
April 19, 2017 14:19
-
-
Save berndruecker/683f478f420635bc0e25403b618078a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(SpringRunner.class) | |
@SpringBootTest(webEnvironment = WebEnvironment.NONE, // | |
classes = TestApplication.class, // | |
properties = { // | |
"camunda.bpm.job-execution.enabled=false", // | |
"camunda.bpm.auto-deployment-enabled=false"}) | |
@Deployment(resources = {"..."}) | |
public class SomeScenarioTest { | |
//... | |
@Autowired | |
private ProcessEngine processEngine; | |
@Rule | |
@ClassRule | |
public static ProcessEngineRule rule; | |
@PostConstruct | |
void initRule() { | |
rule =TestCoverageProcessEngineRuleBuilder.create(processEngine).build(); | |
// Without Coverage: new ProcessEngineRule(processEngine); | |
} | |
//.... | |
// And you need an own config to initialize the test coverage correctly: | |
@TestConfiguration | |
public class CamundaEngineTestCoverageConfiguration extends AbstractCamundaConfiguration { | |
@Override | |
public void preInit(SpringProcessEngineConfiguration configuration) { | |
ProcessCoverageConfigurator.initializeProcessCoverageExtensions(configuration); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment