Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Camunda Community Prague 2013: Testing Extension

Camunda Community Prague 2013: Testing Extension

A camunda-bpm Incubation Project.

Martin Schimak

October 18, 2013
Tweet

More Decks by Martin Schimak

Other Decks in Programming

Transcript

  1. camunda-bpm-testin Martin Schimak, [email protected] Pra ue, Oct. 18th, 2013 A

    camunda-bpm Incubation Project by Rafael Cordones <[email protected]> Jan Galinski <jan. [email protected]> Bernd Rücker <[email protected]> Martin Schimak <[email protected]> Simon Zambrovski <[email protected] > 1
  2. Oct 18th, 2013 | Pra ue camunda Community Day A

    camunda BPM Incubation Project n Library that aims at easin the creation of readable and fluent tests when developin process-centric applications based on the camunda BPMN process en ine n Fork me at https:// ithub.com/camunda/camunda-bpm-testin 2 2
  3. Oct 18th, 2013 | Pra ue camunda Community Day Can

    you decipher your own tests… ? assertThat(task).isAssi nedTo(„martin“) 3 3
  4. Oct 18th, 2013 | Pra ue camunda Community Day Readable

    tests need rich assertions assertThat(task) .isNotNull() .isAssi nedTo(„martin“) .hasDefinitionKey("readableTests") .hasName("Create readable tests") .hasDescription("Super important!"); 4 4
  5. Oct 18th, 2013 | Pra ue camunda Community Day Readable

    tests need a fluent process API 5 pi.task().complete() Task task = taskService.createTaskQuery() .processInstanceId(pi. etId()).sin leResult(); taskService.complete(task. etId()); ? or Beware: quite experimental! 5
  6. Oct 18th, 2013 | Pra ue camunda Community Day Buildin

    on and inte ratin with … nFEST Assertions nMockito nJBehave nNeedle nJUnit nArquillian 6 6
  7. Oct 18th, 2013 | Pra ue camunda Community Day Executable

    Specs with BDD / JBehave (Credits to Jan Galinsky, Simon Zambrovsky) 7 7
  8. Oct 18th, 2013 | Pra ue camunda Community Day Want

    to share an unfinished thou ht … n In todays process tests we typically focus on n mockin / stubbin the behavior of some collaborators (services) … n … and expectin to see specific effects: wait states and service calls n while explicitely drivin the process alon the sequence flow … n When we chan e the internals of a process, those tests typically break…! n it‘s even enou h to chan e e. . the „async“ fla of a service call … n … but hey, what is that unit, whose behavior we actually wanted to test…? n I think we could even more than now focus on n mockin / stubbin the behavior of all collaborators (services & humans) … n … and expectin to see specific process external effects … n … while automatically drivin the process alon the sequence flow 8 8
  9. Oct 18th, 2013 | Pra ue camunda Community Day Contributors

    very welcome! n camunda USR list: camunda-bpm-users@ oo le roups.com n camunda DEV list: camunda-bpm-dev@ oo le roups.com 9 Martin Schimak <[email protected]> 9