TestedFeatures - bptlab/chimera GitHub Wiki
This page documents the automatic tests in Chimera per package. As usual tests are located in src/test.
-
Parsing
- CaseModelManagerTest - Tests the CaseModelManagers ability to parse, save and load different versions of a CaseMode
- CaseModelParserTest - Tests the parsing of the DataModel part of a CaseModel. Therefore tests whether DataClasses, EventClasses, DataAttributes and the ObjectLifecycle are parsed correctly.
- CaseModelSavingTest - Also tests saving of a CaseModel.
- DataFlowParserTest - Tests right parsing of pre- and Postconditions.
- BpmnXmlFragmentParserTest - Very simple test for parsing of incoming and outgoing ControlNodes. Todo: should be extended.
- EventParserTest - Tests the correct parsing of the event behavior for message- send and receive, timer-, and timer-/message- boundary events.
-
CasePersistence
- SimpleCasePersistenceTest - Test the persistence of running Cases. Therefore do the same as ExclusiveGatewayInstanceControlFlowTest but now only execute half of the Case, save everything to the database (via PersistenceManager), load the half executed Case again and execute the rest of the Case.
-
Execution
-
Activities (
de.hpi.bpt.chimera.controlnodes.activity)- EmailActivityInstanceTest - Tests the correct controlflow of an EmailActivtiy (automatic termination) but does not check the correct creation and sending of Emails.
- ExclusiveGatewayInstanceControlFlowDecisionsTest - Test the evaluation of transition conditions like [(3>5 | 2>=3 | 10<=9 | 10<10) & 1=1 ] and the correct activation of corresponding activities after an ExclusiveGateway.
- ExclusiveGatewayInstanceControlFlowTest - Checks whether the controlflow of an ExclusiveGateway works correct and that the correct corresponding activities are activated, and skipped.
- SimpleBeginHumanTaskTest - Tests the behavior of an HumanTask when it becomes controlflow enabled including testing of a to the activity connected Dataclass.
- SimpleTerminateHumanTaksTest - Equivalent to SimpleBeginHumanTaskTest but now the termination is checked.
- WebServiceTaskInstanceTest - Tests a CaseModel with one simple WebServiceTask whose result is saved to an DataAttribute. Attention: This test relies on the web-api of https://www.reisewarnung.net/api?country=DE\. Todo: replace with a Mock.
-
Event Behavior (
de.hpi.bpt.chimera.execution.controlnodes.events.behavior)- MessageReceiveBehaviorTest - Tests the correct controlflow and registratation of MessageReceiveEvents. Therefore only the registration at the EventDispatcher is checked and not the interaction with Unicorn.
-
Features to Test in Future
-
The complete persistence not only for one simple Case, to check whether the complete persistence of running Cases and all the possible Controlnodes and Dataobjects are saved in the right state as a snapshot of the running system. Maybe also check for conflicts because of parallel execution of the execution and persistence of Cases.
-
Test all possible controlnode. For example TimerEvents are still missing.
-
Use mocking for tests which don't work chimera local. For example the correct sending of an Email, the registration of events at Unicorn and maybe also refactor the test for WebServiceTasks so they aren't depending on a special Website.
-
Maybe create some more specialized tests for DataObjects and DataAttributs during Case execution.
-
Maybe create some tests for the REST api-functions, which also have to use mocking.
-
Tests for history and logging.
-
Tests for validation
-
Maybe create one complex CaseModel covering a lot of possibilities, execute it, and the assert the end state (State of Controlnodes, values of DataAttributes of Controlnodes ...) to have one single test for whole chimera.