Skip to content

Commit

Permalink
docs: add index for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pihme committed Jun 14, 2022
1 parent a5cd432 commit 2b6ee1b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Because of this we should wait for a busy state after increasing the engine time

## Examples

For example tests the best place to look right now is the tests in the QA module.
[Examples](examples/README.md)

## Engine lifecycle

Expand Down
34 changes: 34 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Examples

This module contains examples on how to use the assertions to test processes.

## Example: _Pull Request Process_

This example demonstrates how to ...
* Annotate a unit tests
* Deploy processes to the test engine
* Control process execution
* Protect tests from flakiness caused by asynchronous processing in the engine
* Manipulate the time of the engine to trigger timer events
* Assert that deployment was successful
* Assert a certain path was taken / not taken
* Assert state of process instance variables
* Navigate from the main process to spawned child process

**Processes**

The example is based on the following process:
![Pull Request Created Process](assets/pr-created.png)

[Source](src/test/resources/pr-created.bpmn)

Which calls a subprocess _Automated tests_:

![Automated Tests Process](assets/automated-tests.png)

[Source](src/test/resources/automated-tests.bpmn)

**Tests**

[Source](src/test/java/io/camunda/zeebe/process/test/examples/PullRequestProcessTest.java)

Binary file added examples/assets/automated-tests.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/assets/pr-created.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2b6ee1b

Please sign in to comment.