Commit a7dd1ad7 authored by Yann Garcia's avatar Yann Garcia
Browse files

Enhance TestSystem PIXITs. This ver sion dpes not compile

parent 5dca816f
This diff is collapsed.
......@@ -49,32 +49,32 @@ module OneM2M_Pixits {
/**
* @desc IUT CSE Name
*/
modulepar XSD.ID PX_CSE_NAME := "cseName";
modulepar XSD.ID PX_CSE_NAME := "oneMPOWER-IN-CSE";
/**
* @desc IUT CSE-ID with SP-relative-CSE-ID format (relative) according to TS-0001-7.2-1
*/
modulepar XSD.ID PX_CSE_ID := "/cseId";
modulepar XSD.ID PX_CSE_ID := "/ID-CSE-01";
/**
* @desc IUT CSE resource ID with Unstructured-CSE-relative-Resource-ID (relative) format according to TS-0001-7.2-1
*/
modulepar XSD.ID PX_CSE_RESOURCE_ID := "cseResourceId";
modulepar XSD.ID PX_CSE_RESOURCE_ID := "ID-CSE-01";
/**
* @desc IUT M2M-SP-ID with M2M-SP-ID format (absolute) according to TS-0001-7.2-1 Unstructured-CSE-relative -Resource-ID
*/
modulepar XSD.ID PX_SP_ID := "//om2m.org";
modulepar XSD.ID PX_SP_ID := "//idcc.com";
/**
* @desc AE-ID with privileges to CREATE at the IUT CSEBase with AE-ID-Stem format (relative) according to TS-0001-7.2-1
*/
modulepar XSD.ID PX_SUPER_AE_ID := "admin:admin";
modulepar XSD.ID PX_SUPER_AE_ID := "CsuperAE1";
/**
* @desc CSE-ID with privileges to CREATE at the IUT CSEBase with SP-relative-CSE-ID format (relative) according to TS-0001-7.2-1
*/
modulepar XSD.ID PX_SUPER_CSE_ID := "/admin:admin";
modulepar XSD.ID PX_SUPER_CSE_ID := "admin:admin";
/**
* @desc Allowed AE-IDs starting with C
......@@ -112,29 +112,134 @@ module OneM2M_Pixits {
modulepar PrimitiveScope PX_PRIMITIVE_SCOPE := e_cseRelative;
/**
* @desc Serialization to use during test execution
* @desc Test System settings
*/
modulepar charstring PX_SERIALIZATION := "XML";
/**
* @desc Protocolo binding to use during test execution
*/
//modulepar charstring PX_PROTOCOL_BINDING := "HTTP";
/**
* @desc Protocolo binding to use during test execution
*/
modulepar charstring PX_PROTOCOL_BINDING_CSE1 := "HTTP";
/**
* @desc Protocolo binding to use during test execution
*/
modulepar charstring PX_PROTOCOL_BINDING_AE1 := "HTTP";
modulepar TestSystemSettingsDesc PX_TS_SETTINGS := {
AE1 := { // AE1 component settings
mcaPort := {
binding := {
httpBindingDesc := {
bindingProtocol := e_http,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort := 9011, // SUT CoAP/HTTP port
localPort := 3131, // Test Adapter client port (for debug purpose only)
sutAddress := omit
}
}
},
serialization := e_xml
},
mcaPortIn := {
binding := {
httpBindingDesc := {
bindingProtocol := e_http,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort := omit,
localPort := 3141, // Test Adapter listener port (AeSimu acts as server)
sutAddress := omit
}
}
},
serialization := e_xml
}
},
AE2 := { // AE2 component settings
mcaPort := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort := 9010, // SUT CoAP/HTTP port
localPort := 3132, // Test Adapter client port (for debug purpose only)
sutAddress := omit
}
}
},
serialization := e_xml
},
mcaPortIn := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort := omit,
localPort := 3142, // Test Adapter listener port (AeSimu acts as server)
sutAddress := omit
}
}
},
serialization := e_xml
}
},
CSE1 := { // CSE1 component settings
mcaPort := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort:= 9010,
localPort := 3031
}
}
},
serialization := e_xml
},
mcaPortIn := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort:= omit,
localPort := 3041,
sutAddress := omit
}
}
},
serialization := e_xml
},
mccPort := {
binding := {
httpBindingDesc := {
bindingProtocol := e_http,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort:= 9011,
localPort := 4031,
sutAddress := omit
}
}
},
serialization := e_xml
},
mccPortIn := {
binding := {
coapBindingDesc := {
bindingProtocol := e_coap ,
bindingDesc := {
tsAddress := "192.168.56.102",
remotePort:= omit,
localPort := 4041,
sutAddress := omit
}
}
},
serialization := e_xml
}
},
SUT := { sutAddress := "192.168.56.103" },
UT := omit
};
/**
* @desc Protocolo binding to use during test execution
*/
modulepar charstring PX_PROTOCOL_BINDING_AE2 := "HTTP";
modulepar charstring PX_WS_PROTOCOL := "oneM2M.R2.0.xml";
modulepar charstring PX_HOSTING_CSE_ID := "CSE-Dekra-ID";
modulepar charstring PX_CREDENTIAL_ID := "admin:admin";
modulepar charstring PX_REQUEST_URI := "/";
/**
* @desc Namespace composed of "prefix" = "xml namespace" to use during test execution
......@@ -155,21 +260,6 @@ module OneM2M_Pixits {
group TesterParameters {
/**
* @desc AE1 IP address and listening port
*/
modulepar charstring PX_AE1_ADDRESS := "127.0.0.1:3141";
/**
* @desc AE2 IP address and listening port
*/
modulepar charstring PX_AE2_ADDRESS := "127.0.0.1:3142";
/**
* @desc CSE1 IP address and listening port
*/
modulepar charstring PX_CSE1_ADDRESS := "127.0.0.1:4141";
/**
* @desc Test System CSE1 Name
*/
......
......@@ -31,6 +31,7 @@ module OneM2M_Ports {
MsgIn;
out
MsgOut;
map param (in PortDesc p_portDesc, in charstring p_sutAddress);
};
/**
......@@ -62,6 +63,7 @@ module OneM2M_Ports {
UtTriggerAckPrimitive;
out
UtTriggerPrimitive;
map param (in UtDesc p_utDesc)
}
}//end module
......@@ -44,8 +44,8 @@ module OneM2M_Templates {
primitive := { requestPrimitive := p_requestPrimitive},
host := PX_SUT_ADDRESS,
xmlNamespace := PX_XML_NAMESPACE,
protocolBinding := PX_PROTOCOL_BINDING_AE1,
serialization := PX_SERIALIZATION,
protocolBinding := "",
serialization := "",
forcedFields := p_forcedFields
};
......@@ -57,8 +57,8 @@ module OneM2M_Templates {
primitive := { responsePrimitive := p_responsePrimitive},
host := PX_SUT_ADDRESS,
xmlNamespace := PX_XML_NAMESPACE,
protocolBinding := PX_PROTOCOL_BINDING_AE1,
serialization := PX_SERIALIZATION,
protocolBinding := "",
serialization := "",
forcedFields := p_forcedFields
};
......@@ -71,7 +71,7 @@ module OneM2M_Templates {
host := PX_SUT_ADDRESS,
xmlNamespace := PX_XML_NAMESPACE,
protocolBinding := "HTTP",
serialization := PX_SERIALIZATION,
serialization := "",
forcedFields := p_forcedFields
};
......@@ -4141,21 +4141,21 @@ module OneM2M_Templates {
choice := omit//O
};
template RemoteCSE_optional m_contentMyRemoteCSEResource modifies m_contentRemoteCSE_allOmit := {
template RemoteCSE_optional m_contentMyRemoteCSEResource(in charstring p_pointOfAccess) modifies m_contentRemoteCSE_allOmit := {
resourceName := PX_CSE1_NAME,//M
resourceType := int16,//M
resourceID := PX_CSE1_RESOURCE_ID,//M
pointOfAccess := {PX_CSE1_ADDRESS},//O
pointOfAccess := { p_pointOfAccess }, //O
cSEBase := PX_CSE1_ID & "/" & PX_CSE1_NAME,//M
cSE_ID := PX_CSE1_ID,//M
requestReachability := true//M
};
template RemoteCSE_optional m_contentLocalRemoteCSEResource modifies m_contentRemoteCSE_allOmit := {
template RemoteCSE_optional m_contentLocalRemoteCSEResource(in charstring p_pointOfAccess) modifies m_contentRemoteCSE_allOmit := {
resourceName := PX_CSE_NAME,//M
resourceType := int16,//M
resourceID := PX_CSE_RESOURCE_ID,//M
pointOfAccess := {PX_SUT_ADDRESS},//O
pointOfAccess := { p_pointOfAccess },//O
cSEBase := PX_CSE_ID & "/" & PX_CSE_NAME,//M
cSE_ID := PX_CSE_ID,//M
requestReachability := true//M
......
......@@ -22,6 +22,22 @@ module OneM2M_TestSystem {
* Test System Components
* ***************************************
*/
type enumerated InterfaceIds {
e_mca_port (0),
e_mca_in_port (1),
e_mcc_port (2),
e_mcc_in_port (3)
}
type record Interface {
OneM2MPort myPort,
charstring myProtocolBinding,
charstring mySerialization
}
type record of Interface Interfaces;
type component Tester {
port AdapterControlPort acPort;
port InfoPort infoPort;
......@@ -30,7 +46,6 @@ module OneM2M_TestSystem {
timer tc_ac := PX_TAC;
timer tc_wait := PX_TWAIT;
//global variables
var charstring vc_protocolBinding;
var Configurations vc_config;
var TestSystemRole vc_testSystemRole;
var MyResourcesList vc_resourcesList;
......@@ -41,6 +56,7 @@ module OneM2M_TestSystem {
var default vc_aeSimu := null;
var default vc_cseSimu := null;
var PrimitiveContent vc_primitiveContentRetrievedResource;
var Interfaces vc_myInterfaces := {};
};
type component AeSimu extends Tester {
......
......@@ -16,7 +16,6 @@ module OneM2M_Types {
import from XSD all;
type record AccessControlPolicy
{
ResourceName resourceName,
......@@ -8734,6 +8733,178 @@ group OtherTypes {
variant "list";
};
}
group tsSettings {
/**
* @desc Authorized protocol bindings
* @member e_http HTTP protocol binding
* @member e_coap CoAP protocol binding
* @member e_mqtt MQTT protocol binding
* @member e_ws WebSocket protocol binding
*/
type enumerated ProtocolBindings {
e_http (0),
e_coap (1),
e_mqtt (2),
e_wsck (3)
}
/**
* @desc Authorized serialization protocols
* @member e_http Data serialization using HTTP
* @member e_xml Data serialization using XML
* @member e_jsaon Data serialization using JSON
* @member e_text Data serialization using text
* @member e_raw Data serialization using binary formay
*/
type enumerated SerializationProtocols {
e_xml (0),
e_json (1),
e_cbor (2)
}
type record of charstring SerializationProtocolsLabels;
const SerializationProtocolsLabels c_serializationLabel := { "xml", "json", "cbor" };
/**
* @desc Basic description of a Protocol Binding settings
* @member tsAddress Test System IP address
* @member remotePort Remote port (SUT listener port)
* @member localPort Test Adapter listener port (used by mcxPortIn) or,
* The local client port. In this case, the value 'omit' is interpreted as random port number by the Test Adapter
* @member sutAddress SUT IP address, optional.
* If omitted, the SUT IP address defined in SutDesc data structure will be used by the Test Adapter
*/
type record BindingDesc {
charstring tsAddress,
integer remotePort optional,
integer localPort optional,
charstring sutAddress optional
}
/**
* @desc HTTP binding protocol settings
*/
type record HttpBindingDesc {
ProtocolBindings bindingProtocol (e_http),
BindingDesc bindingDesc
}
/**
* @desc COAP binding protocol settings
*/
type record CoapBindingDesc {
ProtocolBindings bindingProtocol (e_coap),
BindingDesc bindingDesc
}
/**
* @desc MQTT binding protocol settings
* @member bindingProtocol
* @member hostingCSE_ID
* @member credentialId
* @member bindingDesc
*/
type record MqttBindingDesc {
ProtocolBindings bindingProtocol (e_mqtt),
BindingDesc bindingDesc,
charstring hostingCSE_ID,
charstring credentialId
// TODO To be completed
}
/**
* @desc WebSocket binding protocol settings
*/
type record WSBindingDesc {
ProtocolBindings bindingProtocol (e_wsck),
BindingDesc bindingDesc,
charstring requestUri
// TODO To be completed
}
type union BindingProtocolsSelect {
HttpBindingDesc httpBindingDesc,
CoapBindingDesc coapBindingDesc,
MqttBindingDesc mqttBindingDesc,
WSBindingDesc wsBindingDesc
}
/**
* @desc
* @member binding
* @member serialization
*/
type record PortDesc {
BindingProtocolsSelect binding,
SerializationProtocols serialization
}
type record SutDesc {
charstring sutAddress
}
/**
* @desc UpperTester component settinmgs
* @member requestId
* @member tsAddress Test System IP address
* @member tsRemotePort Test System UpperTester listener port
* @member sutAddress SUT IP address
* @member sutRemotePort IUT UpperTester listener port
*/
type record UtDesc {
charstring tsAddress,
integer utApplicationPort,
charstring utApplicationAddress optional,
charstring utApplicationUrl
}
/**
* @desc AeSimu component settings
* @member mcaPort TTCN-3 'mca' protocol for sending to the SUT
* @member mcaPortIn TTCN-3 'mca' protocol for receiving from the SUT
*/
type record AeSimuComponentDesc {
PortDesc mcaPort,
PortDesc mcaPortIn
}
/**
* @desc CseSimu component settings
* @member mcaPort TTCN-3 'mca' protocol for sending to the SUT
* @member mcaPortIn TTCN-3 'mca' protocol for receiving from the SUT
* @member mccPort TTCN-3 'mcc' protocol for sending to the SUT
* @member mccPortIn TTCN-3 'mcc' protocol for receiving from the SUT
*/
type record CseSimuComponentDesc {
PortDesc mcaPort,
PortDesc mcaPortIn,
PortDesc mccPort,
PortDesc mccPortIn
}
/**
* @desc Test System settings
* @member ae1Simu Ae1Simu component settings
* @member ae2Simu Ae2Simu component settings
* @member cse1Simu Cse1Simu component settings
* @member sutDesc SUT settings
* @member utDesc UpperTester component settings
*/
type record TestSystemSettingsDesc {
AeSimuComponentDesc AE1,
AeSimuComponentDesc AE2,
CseSimuComponentDesc CSE1,
SutDesc SUT,
UtDesc UT optional
}
}
with {
encode "";
} // End of group tsSettings
}
with {
encode "XML";
......
This diff is collapsed.
......@@ -539,12 +539,12 @@ module OneM2M_Testcases_AE_Release_1 {
v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive);
//send back responsePrimitive
mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
}
[] mcaPortIn.receive(mw_request(mw_createAe())) -> value v_request {
tc_ac.stop;
setverdict(fail, __SCOPE__ & " : Unexpected AE registration request");
mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
......@@ -765,12 +765,12 @@ module OneM2M_Testcases_AE_Release_1 {
v_responsePrimitive := valueof(m_responsePrimitive(int2002, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
}
[] mcaPortIn.receive (mw_request(mw_delete(?))) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & " : Unexpected DELETE request");
mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
......@@ -828,12 +828,12 @@ module OneM2M_Testcases_AE_Release_1 {
setverdict(pass, __SCOPE__ & " : Container creation request is accepted!");
v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive);
//send back responsePrimitive
mcaPortIn.send(f_getMsgOutPrimitive(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive))));
f_send(e_mca_in_port, f_getMsgOutPrimitive(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive))));
}
[] mcaPortIn.receive(mw_request(mw_create)) -> value v_request{
tc_ac.stop;
setverdict(fail, __SCOPE__ & " : Unexpected CREATE request ");
mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
......@@ -888,12 +888,12 @@ module OneM2M_Testcases_AE_Release_1 {
setverdict(pass, __SCOPE__ & " : ContentInstance creation request is accepted!!");
v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive);
//send back responsePrimitive
mcaPortIn.send(f_getMsgOutPrimitive(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive))));
f_send(e_mca_in_port, f_getMsgOutPrimitive(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive))));
}
[] mcaPortIn.receive(mw_request(mw_create)) -> value v_request {
tc_ac.stop;
setverdict(fail, __SCOPE__ & " : Unexpected CREATE request ");
mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
......@@ -1451,12 +1451,12 @@ module OneM2M_Testcases_AE_Release_1 {
tc_ac.stop;
setverdict(pass, __SCOPE__ & " : retrieve attribute oldest request is accepted!");
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
}
[] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request {
tc_ac.stop;
setverdict(fail, __SCOPE__ & " : Retrieve Request for unexpected target");
mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
......@@ -1513,12 +1513,12 @@ module OneM2M_Testcases_AE_Release_1 {
tc_ac.stop;
setverdict(pass, __SCOPE__ & " : retrieve attribute latest request is accepted!!");
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
}
[] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request {
tc_ac.stop;
setverdict(fail, __SCOPE__ & " : Retrieve Request for unexpected target");
mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
......@@ -1571,12 +1571,12 @@ module OneM2M_Testcases_AE_Release_1 {
tc_ac.stop;
setverdict(pass, __SCOPE__ & " : retrieve resource type request is accepted!!");
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
}
[] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request {
tc_ac.stop;
setverdict(fail, __SCOPE__ & " : Retrieve Request for unexpected target");