Commit e85801a1 authored by Federico Sismondi's avatar Federico Sismondi

testcase start event sends testcase_id inside

parent deea24e3
......@@ -27,7 +27,7 @@ Usage:
>>> from messages import * # doctest: +SKIP
>>> m = MsgTestCaseSkip()
>>> m
MsgTestCaseSkip(_api_version = 0.1.31, _type = testcoordination.testcase.skip, testcase_id = TD_COAP_CORE_02_v01, )
MsgTestCaseSkip(_api_version = 0.1.32, _type = testcoordination.testcase.skip, testcase_id = TD_COAP_CORE_02_v01, )
>>> m.routing_key
'control.testcoordination'
>>> m.message_id # doctest: +SKIP
......@@ -38,18 +38,18 @@ MsgTestCaseSkip(_api_version = 0.1.31, _type = testcoordination.testcase.skip, t
# also we can modify some of the fields (rewrite the default ones)
>>> m = MsgTestCaseSkip(testcase_id = 'TD_COAP_CORE_03_v01')
>>> m
MsgTestCaseSkip(_api_version = 0.1.31, _type = testcoordination.testcase.skip, testcase_id = TD_COAP_CORE_03_v01, )
MsgTestCaseSkip(_api_version = 0.1.32, _type = testcoordination.testcase.skip, testcase_id = TD_COAP_CORE_03_v01, )
>>> m.testcase_id
'TD_COAP_CORE_03_v01'
# and even export the message in json format (for example for sending the message though the amqp event bus)
>>> m.to_json()
'{"_api_version": "0.1.31", "_type": "testcoordination.testcase.skip", "testcase_id": "TD_COAP_CORE_03_v01"}'
'{"_api_version": "0.1.32", "_type": "testcoordination.testcase.skip", "testcase_id": "TD_COAP_CORE_03_v01"}'
# We can use the Message class to import json into Message objects:
>>> m=MsgTestSuiteStart()
>>> m.to_json()
'{"_api_version": "0.1.31", "_type": "testcoordination.testsuite.start"}'
'{"_api_version": "0.1.32", "_type": "testcoordination.testsuite.start"}'
>>> json_message = m.to_json()
>>> obj=Message.from_json(json_message)
>>> type(obj)
......@@ -62,7 +62,7 @@ MsgTestCaseSkip(_api_version = 0.1.31, _type = testcoordination.testcase.skip, t
# the error reply (note that we pass the message of the request to build the reply):
>>> err = MsgErrorReply(m)
>>> err
MsgErrorReply(_api_version = 0.1.31, _type = sniffing.start, error_code = Some error code TBD, error_message = Some
MsgErrorReply(_api_version = 0.1.32, _type = sniffing.start, error_code = Some error code TBD, error_message = Some
error message TBD, ok = False, )
>>> m.reply_to
'control.sniffing.service.reply'
......@@ -81,7 +81,7 @@ import time
import json
import uuid
API_VERSION = '0.1.31'
API_VERSION = '0.1.32'
# TODO use metaclasses instead?
......@@ -548,12 +548,15 @@ class MsgTestCaseStart(Message):
Description:
- Message used for indicating the testing tool to start the test case (the one previously selected)
- if testcase_id is Null then testing tool starts previously announced testcase in message
"testcoordination.testcase.ready",
"""
routing_key = "control.testcoordination"
_msg_data_template = {
"_type": "testcoordination.testcase.start",
"description": "Event test case START"
"description": "Event test case START",
"testcase_id": "TBD",
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment