-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init * #5 simple test case * #5 test without result enabled * MessageApi from generic_camunda_client seems broken * validate deleted processes are deleted * convert collections to json
- Loading branch information
1 parent
c660c94
commit 1dc7727
Showing
5 changed files
with
300 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0o68s4x" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.6.0"> | ||
<bpmn:collaboration id="Collaboration_1259shc"> | ||
<bpmn:participant id="Participant_17r119v" name="Send Message" processRef="process_send_message" /> | ||
<bpmn:participant id="Participant_01x95n7" name="Receive Message" processRef="process_receive_message" /> | ||
<bpmn:messageFlow id="Flow_13avncs" sourceRef="Activity_07thf2h" targetRef="Event_1w9m0l7" /> | ||
</bpmn:collaboration> | ||
<bpmn:process id="process_send_message" name="Send Message" isExecutable="true"> | ||
<bpmn:startEvent id="StartEvent_1"> | ||
<bpmn:outgoing>Flow_0b7wd5l</bpmn:outgoing> | ||
</bpmn:startEvent> | ||
<bpmn:endEvent id="Event_0w7ck3j"> | ||
<bpmn:incoming>Flow_0d25nx3</bpmn:incoming> | ||
</bpmn:endEvent> | ||
<bpmn:sendTask id="Activity_07thf2h" name="Send message" camunda:type="external" camunda:topic="send_message"> | ||
<bpmn:incoming>Flow_0b7wd5l</bpmn:incoming> | ||
<bpmn:outgoing>Flow_0d25nx3</bpmn:outgoing> | ||
</bpmn:sendTask> | ||
<bpmn:sequenceFlow id="Flow_0b7wd5l" sourceRef="StartEvent_1" targetRef="Activity_07thf2h" /> | ||
<bpmn:sequenceFlow id="Flow_0d25nx3" sourceRef="Activity_07thf2h" targetRef="Event_0w7ck3j" /> | ||
</bpmn:process> | ||
<bpmn:process id="process_receive_message" name="Receive Message" isExecutable="true"> | ||
<bpmn:startEvent id="Event_1w9m0l7"> | ||
<bpmn:outgoing>Flow_1y1q6p6</bpmn:outgoing> | ||
<bpmn:messageEventDefinition id="MessageEventDefinition_0ncs6dd" messageRef="Message_1253uuy" /> | ||
</bpmn:startEvent> | ||
<bpmn:endEvent id="Event_0mydum3"> | ||
<bpmn:incoming>Flow_0h9hvs6</bpmn:incoming> | ||
</bpmn:endEvent> | ||
<bpmn:serviceTask id="Activity_1rllkk3" name="Read message" camunda:type="external" camunda:topic="read_message"> | ||
<bpmn:incoming>Flow_1y1q6p6</bpmn:incoming> | ||
<bpmn:outgoing>Flow_0h9hvs6</bpmn:outgoing> | ||
</bpmn:serviceTask> | ||
<bpmn:sequenceFlow id="Flow_1y1q6p6" sourceRef="Event_1w9m0l7" targetRef="Activity_1rllkk3" /> | ||
<bpmn:sequenceFlow id="Flow_0h9hvs6" sourceRef="Activity_1rllkk3" targetRef="Event_0mydum3" /> | ||
</bpmn:process> | ||
<bpmn:message id="Message_1253uuy" name="receive_message" /> | ||
<bpmndi:BPMNDiagram id="BPMNDiagram_1"> | ||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1259shc"> | ||
<bpmndi:BPMNShape id="Participant_17r119v_di" bpmnElement="Participant_17r119v" isHorizontal="true"> | ||
<dc:Bounds x="170" y="80" width="430" height="330" /> | ||
</bpmndi:BPMNShape> | ||
<bpmndi:BPMNEdge id="Flow_0b7wd5l_di" bpmnElement="Flow_0b7wd5l"> | ||
<di:waypoint x="318" y="200" /> | ||
<di:waypoint x="370" y="200" /> | ||
</bpmndi:BPMNEdge> | ||
<bpmndi:BPMNEdge id="Flow_0d25nx3_di" bpmnElement="Flow_0d25nx3"> | ||
<di:waypoint x="470" y="200" /> | ||
<di:waypoint x="502" y="200" /> | ||
</bpmndi:BPMNEdge> | ||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"> | ||
<dc:Bounds x="282" y="182" width="36" height="36" /> | ||
</bpmndi:BPMNShape> | ||
<bpmndi:BPMNShape id="Event_1xcbx8p_di" bpmnElement="Event_0w7ck3j"> | ||
<dc:Bounds x="502" y="182" width="36" height="36" /> | ||
</bpmndi:BPMNShape> | ||
<bpmndi:BPMNShape id="Activity_1d0huma_di" bpmnElement="Activity_07thf2h"> | ||
<dc:Bounds x="370" y="160" width="100" height="80" /> | ||
</bpmndi:BPMNShape> | ||
<bpmndi:BPMNShape id="Participant_01x95n7_di" bpmnElement="Participant_01x95n7" isHorizontal="true"> | ||
<dc:Bounds x="170" y="430" width="440" height="250" /> | ||
</bpmndi:BPMNShape> | ||
<bpmndi:BPMNEdge id="Flow_1y1q6p6_di" bpmnElement="Flow_1y1q6p6"> | ||
<di:waypoint x="288" y="560" /> | ||
<di:waypoint x="340" y="560" /> | ||
</bpmndi:BPMNEdge> | ||
<bpmndi:BPMNEdge id="Flow_0h9hvs6_di" bpmnElement="Flow_0h9hvs6"> | ||
<di:waypoint x="440" y="560" /> | ||
<di:waypoint x="492" y="560" /> | ||
</bpmndi:BPMNEdge> | ||
<bpmndi:BPMNShape id="Event_1bv3c92_di" bpmnElement="Event_1w9m0l7"> | ||
<dc:Bounds x="252" y="542" width="36" height="36" /> | ||
</bpmndi:BPMNShape> | ||
<bpmndi:BPMNShape id="Event_0mydum3_di" bpmnElement="Event_0mydum3"> | ||
<dc:Bounds x="492" y="542" width="36" height="36" /> | ||
</bpmndi:BPMNShape> | ||
<bpmndi:BPMNShape id="Activity_04v26ri_di" bpmnElement="Activity_1rllkk3"> | ||
<dc:Bounds x="340" y="520" width="100" height="80" /> | ||
</bpmndi:BPMNShape> | ||
<bpmndi:BPMNEdge id="Flow_13avncs_di" bpmnElement="Flow_13avncs"> | ||
<di:waypoint x="420" y="240" /> | ||
<di:waypoint x="420" y="391" /> | ||
<di:waypoint x="270" y="391" /> | ||
<di:waypoint x="270" y="542" /> | ||
</bpmndi:BPMNEdge> | ||
</bpmndi:BPMNPlane> | ||
</bpmndi:BPMNDiagram> | ||
</bpmn:definitions> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
*** Settings *** | ||
Library CamundaLibrary ${CAMUNDA_HOST} | ||
Library Collections | ||
Resource ../cleanup.resource | ||
Suite Setup Deploy ${MODEL} | ||
|
||
*** Variables *** | ||
${MODEL} ${CURDIR}/../../bpmn/message_test.bpmn | ||
${PROCESS_DEFINITION_KEY_SEND_MESSAGE} process_send_message | ||
${PROCESS_DEFINITION_KEY_RECEIVE_MESSAGE} process_receive_message | ||
${TOPIC_SEND_MESSAGE} send_message | ||
${TOPIC_RECEIVE_MESSAGE} read_message | ||
${MESSAGE_NAME} receive_message | ||
|
||
|
||
*** Test Cases *** | ||
Test Messaging with Message Result | ||
[Setup] Prepare testcase | ||
#GIVEN | ||
Get workload from topic '${TOPIC_RECEIVE_MESSAGE}' | ||
Last topic should have no workload | ||
${workload} Get workload from topic '${TOPIC_SEND_MESSAGE}' | ||
|
||
# EXPECT | ||
Last topic should have workload | ||
|
||
# WHEN | ||
${message_response} Deliver Message ${MESSAGE_NAME} | ||
Complete task | ||
|
||
# THEN | ||
Get workload from topic '${TOPIC_RECEIVE_MESSAGE}' | ||
Last topic should have workload | ||
Complete task | ||
|
||
Get workload from topic '${TOPIC_SEND_MESSAGE}' | ||
Last topic should have no workload | ||
|
||
Should Not Be Empty ${message_response} | ||
|
||
Test Messaging without Message Result | ||
[Setup] Prepare testcase | ||
#GIVEN | ||
Get workload from topic '${TOPIC_RECEIVE_MESSAGE}' | ||
Last topic should have no workload | ||
${workload} Get workload from topic '${TOPIC_SEND_MESSAGE}' | ||
|
||
# EXPECT | ||
Last topic should have workload | ||
|
||
# WHEN | ||
${message_response} Deliver Message ${MESSAGE_NAME} result_enabled=${False} | ||
Complete task | ||
|
||
# THEN | ||
Get workload from topic '${TOPIC_RECEIVE_MESSAGE}' | ||
Last topic should have workload | ||
Complete task | ||
|
||
Get workload from topic '${TOPIC_SEND_MESSAGE}' | ||
Last topic should have no workload | ||
|
||
Should Be Empty ${message_response} | ||
|
||
Test Messaging with variable | ||
[Setup] Prepare testcase | ||
#GIVEN | ||
${process_variables} Create Dictionary message=Hello World | ||
Get workload from topic '${TOPIC_RECEIVE_MESSAGE}' | ||
Last topic should have no workload | ||
${workload} Get workload from topic '${TOPIC_SEND_MESSAGE}' | ||
|
||
# EXPECT | ||
Last topic should have workload | ||
|
||
# WHEN | ||
${message_response} Deliver Message ${MESSAGE_NAME} process_variables=${process_variables} | ||
Complete task | ||
|
||
# THEN | ||
${received_message_workload} Get workload from topic '${TOPIC_RECEIVE_MESSAGE}' | ||
Last topic should have workload | ||
Dictionaries Should Be Equal ${process_variables} ${received_message_workload} | ||
Complete task | ||
|
||
Get workload from topic '${TOPIC_SEND_MESSAGE}' | ||
Last topic should have no workload | ||
|
||
Should Not Be Empty ${message_response} | ||
[Teardown] Complete Task | ||
|
||
Test Messaging with dict variable | ||
[Setup] Prepare testcase | ||
#GIVEN | ||
${languages} Create List Suomi English | ||
${person} Create Dictionary firstname=Pekka lastname=Klärck languages=${languages} | ||
${process_variables} Create Dictionary person=${person} | ||
Get workload from topic '${TOPIC_RECEIVE_MESSAGE}' | ||
Last topic should have no workload | ||
${workload} Get workload from topic '${TOPIC_SEND_MESSAGE}' | ||
|
||
# EXPECT | ||
Last topic should have workload | ||
|
||
# WHEN | ||
${message_response} Deliver Message ${MESSAGE_NAME} process_variables=${process_variables} | ||
Complete task | ||
|
||
# THEN | ||
${received_message_workload} Get workload from topic '${TOPIC_RECEIVE_MESSAGE}' | ||
Last topic should have workload | ||
Dictionaries Should Be Equal ${process_variables} ${received_message_workload} | ||
Complete task | ||
|
||
Get workload from topic '${TOPIC_SEND_MESSAGE}' | ||
Last topic should have no workload | ||
|
||
Should Not Be Empty ${message_response} | ||
|
||
|
||
*** Keywords *** | ||
Prepare testcase | ||
Delete all instances from process '${PROCESS_DEFINITION_KEY_SEND_MESSAGE}' | ||
Delete all instances from process '${PROCESS_DEFINITION_KEY_RECEIVE_MESSAGE}' | ||
Start process ${PROCESS_DEFINITION_KEY_SEND_MESSAGE} | ||
|
||
|
||
Get workload from topic '${topic}' | ||
${workload} Fetch Workload ${topic} | ||
[Return] ${workload} | ||
|
||
Last topic should have workload | ||
${recent_process_instance} Get fetch response | ||
Should not be empty ${recent_process_instance} | ||
|
||
Last topic should have no workload | ||
${recent_process_instance} Get fetch response | ||
Should Be Empty ${recent_process_instance} |
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