Commit 754fbd31 authored by Federico Sismondi's avatar Federico Sismondi

Runner for all automated interop tests

parent bd4def25
This diff is collapsed.
......@@ -319,9 +319,9 @@ _docker-build-coap-additional-resources:
docker build --quiet -t automated_iut-coap_client-libcoap-v$(version) -f automation/coap_client_libcoap/Dockerfile .
docker tag automated_iut-coap_client-libcoap-v$(version):latest automated_iut-coap_client-libcoap
# automated_iut-coap_server-august_cellars (WIP)
docker build --quiet -t automated_iut-coap_server-august_cellars-v$(version) -f automation/coap_server_august_cellars/Dockerfile .
docker tag automated_iut-coap_server-august_cellars-v$(version):latest automated_iut-coap_server-august_cellars
# # automated_iut-coap_server-august_cellars (WIP)
# docker build --quiet -t automated_iut-coap_server-august_cellars-v$(version) -f automation/coap_server_august_cellars/Dockerfile .
# docker tag automated_iut-coap_server-august_cellars-v$(version):latest automated_iut-coap_server-august_cellars
_docker-build-lwm2m-additional-resources:
@echo "Starting to build lwm2m-additional-resources.. "
......
- name: "aiocoap-cli-vs-californium-server"
target_start: "_setup-coap-mini-interop-aiocoap-cli-vs-californium-server"
target_start: "_run-coap-mini-interop-aiocoap-cli-vs-californium-server"
target_stop: "stop-all"
delim: "aiocoap-cli-vs-californium-server"
- name: "libcoap-cli-vs-californium-server"
target_start: "_setup-coap-mini-interop-libcoap-cli-vs-californium-server"
target_start: "_run-coap-mini-interop-libcoap-cli-vs-californium-server"
target_stop: "stop-all"
delim: "libcoap-cli-vs-californium-server"
- name: "californium-cli-vs-californium-server"
target_start: "_setup-coap-mini-interop-californium-cli-vs-californium-server"
target_start: "_run-coap-mini-interop-californium-cli-vs-californium-server"
target_stop: "stop-all"
delim: "californium-cli-vs-californium-server"
- name: "coapthon-cli-vs-californium-server"
target_start: "_setup-coap-mini-interop-coapthon-cli-vs-californium-server"
target_start: "_run-coap-mini-interop-coapthon-cli-vs-californium-server"
target_stop: "stop-all"
delim: "coapthon-cli-vs-californium-server"
- name: "californium-cli-vs-coapthon-server"
target_start: "_setup-coap-mini-interop-californium-cli-vs-coapthon-server"
target_start: "_run-coap-mini-interop-californium-cli-vs-coapthon-server"
target_stop: "stop-all"
delim: "californium-cli-vs-coapthon-server"
- name: "coapthon-cli-vs-coapthon-server"
target_start: "_setup-coap-mini-interop-coapthon-cli-vs-coapthon-server"
target_start: "_run-coap-mini-interop-coapthon-cli-vs-coapthon-server"
target_stop: "stop-all"
delim: "coapthon-cli-vs-coapthon-server"
This diff is collapsed.
This diff is collapsed.
import os
import json
import logging
from collections.__init__ import OrderedDict
from ioppytest.ui_adaptor.message_rendering import (testsuite_results_to_ascii_table,
testcase_verdict_to_ascii_table,
testsuite_state_to_ascii_table
)
from event_bus_utils import AmqpListener, publish_message
from messages import (MsgUiRequestSessionConfiguration,
MsgTestingToolTerminate,
MsgTestSuiteReport,
MsgTestCaseVerdict,
MsgUiSessionConfigurationReply
)
logger = logging.getLogger(__name__)
TESTSUITE_NAME = os.environ.get('TESTNAME', 'noname')
TESTSUITE_REPORT_DELIM = os.environ.get('DELIM', '===TESTRESULT===')
default_configuration = {
"testsuite.testcases": None # None => default config (all test cases)
}
class UIStub(AmqpListener):
def __init__(self, amqp_url, amqp_exchange):
AmqpListener.__init__(self, amqp_url, amqp_exchange,
callback=self.process_message,
topics=[
MsgUiRequestSessionConfiguration.routing_key,
MsgTestingToolTerminate.routing_key,
MsgTestCaseVerdict.routing_key,
MsgTestSuiteReport.routing_key,
],
use_message_typing=True)
def process_message(self, message):
if isinstance(message, MsgUiRequestSessionConfiguration):
resp = {
"configuration": default_configuration,
"id": '666',
"testSuite": "someTestingToolName",
"users": ['pablo', 'bengoechea'],
}
m = MsgUiSessionConfigurationReply(
message,
**resp
)
publish_message(self.connection, m)
elif isinstance(message, MsgTestSuiteReport):
verdict_content = OrderedDict()
verdict_content['testname'] = TESTSUITE_NAME
verdict_content.update(message.to_odict())
# note TESTSUITE_REPORT_DELIM is parsed by continuous interop testing automation components.
logger.info(
"%s %s %s", TESTSUITE_REPORT_DELIM, json.dumps(verdict_content, indent=4), TESTSUITE_REPORT_DELIM)
logger.info(
"%s: \n%s ", "Test Suite Table Report", testsuite_results_to_ascii_table(message.tc_results))
elif isinstance(message, MsgTestCaseVerdict):
verdict_content = OrderedDict()
verdict_content['testname'] = TESTSUITE_NAME
verdict_content.update(message.to_odict())
ascii_table, _ = testcase_verdict_to_ascii_table(message.to_dict())
logger.info("%s: \n%s ", "Test Case verdict issued", ascii_table)
elif isinstance(message, MsgTestingToolTerminate):
logger.info("Received termination message. Stopping UIStub")
self.stop()
else:
logger.warning(
'reply_to_ui_configuration_request_stub got not expected message type %s' % str(type(message)))
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