Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
TST
ATS
Commits
8650b38a
Commit
8650b38a
authored
Sep 18, 2019
by
Miguel Angel Reina Ortega
Browse files
Review of TC_AE_SUB_NTF_001 and TC_AE_SUB_NTF_002
Signed-off-by:
reinaortega
<
miguelangel.reinaortega@etsi.org
>
parent
6a4adf24
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
143 deletions
+37
-143
OneM2M_Testcases_AE_Release_1.ttcn
OneM2M_Testcases_AE_Release_1.ttcn
+37
-143
No files found.
OneM2M_Testcases_AE_Release_1.ttcn
View file @
8650b38a
...
@@ -1961,79 +1961,23 @@ module OneM2M_Testcases_AE_Release_1 {
...
@@ -1961,79 +1961,23 @@ module OneM2M_Testcases_AE_Release_1 {
function
f_AE_SUB_NTF_001
()
runs
on
CseSimu
system
AeSystem
{
function
f_AE_SUB_NTF_001
()
runs
on
CseSimu
system
AeSystem
{
//variables
//variables
var
template
UtTriggerPrimitive
v_utRequest
:=
m_utCreateAe
;
var
RequestPrimitive
v_req
;
var
MsgIn
v_request
;
var
integer
v_aeLocalIndex
:=
-
1
;
var
integer
v_parentIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
PrimitiveContent
v_resource
;
var
ResponsePrimitive
v_responsePrimitive
;
var
universal
charstring
v_action
:=
__SCOPE__
&
": Please, send a valid AE Registration CREATE Request"
;
f_cf03Up
();
//create Ae
v_utRequest
.
requestPrimitive
.
to_
:=
f_getLocalResourceAddress
();
f_sendUtPrimitive
(
v_utRequest
,
v_action
);
tc_ac
.
start
;
alt
{
[]
mcaPortIn
.
receive
(
mw_request
(
mw_createAe
))
->
value
v_request
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
" : AE registration request is accepted!!"
);
v_parentIndex
:=
f_getLocalResourceIndex
(
v_request
.
primitive
.
requestPrimitive
.
to_
);
v_resource
:=
f_generateLocalResource
(
v_request
.
primitive
.
requestPrimitive
.
primitiveContent
,
v_parentIndex
,
v_request
.
primitive
.
requestPrimitive
.
resourceType
);
v_resourceIndex
:=
f_setLocalResource
(
v_resource
,
v_request
.
primitive
.
requestPrimitive
.
resourceType
,
v_parentIndex
);
v_responsePrimitive
:=
valueof
(
m_responsePrimitive
(
int2001
,
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
,
vc_localResourcesList
[
v_resourceIndex
].
resource
));
//send back responsePrimitive
f_send
(
e_mca_in_port
,
m_response
(
v_responsePrimitive
));
}
[]
mcaPortIn
.
receive
(
mw_request
(
mw_createAe
(
*
,
?
,
m_contentCreateAe_Invalid
)))
->
value
v_request
{
tc_ac
.
stop
;
setverdict
(
inconc
,
__SCOPE__
&
" : AE registration request is rejected due to not including mandatory attributes!!"
);
f_send
(
e_mca_in_port
,
m_response
(
valueof
(
m_responsePrimitive
(
int4004
,
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
,
omit
))));
}
[]
tc_ac
.
timeout
{
setverdict
(
inconc
,
__SCOPE__
&
" : Timeout due to no response received from requested SUT!"
);
}
}
f_checkCseSimuStatus
();
// Test control
//create Subscription
v_utRequest
:=
m_utCreateSubscription
;
v_utRequest
.
requestPrimitive
.
to_
:=
f_getLocalResourceAddress
(
v_resourceIndex
);
v_action
:=
"Please, send a valid CREATE request for Subscription"
;
f_sendUtPrimitive
(
v_utRequest
,
v_action
);
tc_ac
.
start
;
alt
{
[]
mcaPortIn
.
receive
(
mw_request
(
mw_createSubscription
))
->
value
v_request
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
" : Subscription creation request is accepted!"
);
v_parentIndex
:=
f_getLocalResourceIndex
(
v_request
.
primitive
.
requestPrimitive
.
to_
);
v_resource
:=
f_generateLocalResource
(
v_request
.
primitive
.
requestPrimitive
.
primitiveContent
,
v_parentIndex
,
v_request
.
primitive
.
requestPrimitive
.
resourceType
);
v_resourceIndex
:=
f_setLocalResource
(
v_resource
,
v_request
.
primitive
.
requestPrimitive
.
resourceType
,
v_parentIndex
);
v_responsePrimitive
:=
valueof
(
m_responsePrimitive
(
int2001
,
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
,
vc_localResourcesList
[
v_resourceIndex
].
resource
));
//send back responsePrimitive
// Test component configuration
f_send
(
e_mca_in_port
,
m_response
(
v_responsePrimitive
));
f_cf03Up
();
}
[]
mcaPortIn
.
receive
{
tc_ac
.
stop
;
setverdict
(
inconc
,
__SCOPE__
&
" : Subscription creation request is rejected due to not including mandatory attributes!!"
);
f_send
(
e_mca_in_port
,
m_response
(
valueof
(
m_responsePrimitive
(
int4004
,
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
,
omit
))));
}
[]
tc_ac
.
timeout
{
setverdict
(
inconc
,
__SCOPE__
&
" : Timeout due to no response received from requested SUT!"
);
}
}
f_checkCseSimuStatus
();
// Preamble
// create Ae
v_aeLocalIndex
:=
f_ae_preamble_registerAe
();
//Test behavior
//Test behavior
f_send
(
e_mca_port
,
m_request
(
m_notify
(
f_getLocalResourceAddress
(
v_resourceIndex
))));
v_req
:=
valueof
(
m_notifyNotification
(
""
,
m_contentNotification_subscriptionVerification
(
PX_TS_CSE1
.
cseId
)));
v_req
.
from_
:=
PX_TS_CSE1
.
cseId
;
f_send
(
e_mca_port
,
m_request
(
v_req
));
tc_ac
.
start
;
tc_ac
.
start
;
alt
{
alt
{
...
@@ -2041,9 +1985,13 @@ module OneM2M_Testcases_AE_Release_1 {
...
@@ -2041,9 +1985,13 @@ module OneM2M_Testcases_AE_Release_1 {
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
" : Notification response is accepted!"
);
setverdict
(
pass
,
__SCOPE__
&
" : Notification response is accepted!"
);
}
}
[]
mcaPort
.
receive
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
" : Notification response with wrong response status code"
);
}
[]
mcaPort
.
receive
(
mw_response
(
?
))
{
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
" : Notification response
is rejected due to not including mandatory attributes!
"
);
setverdict
(
fail
,
__SCOPE__
&
" :
Unexpected
Notification response"
);
}
}
[]
tc_ac
.
timeout
{
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
" : Timeout due to no response received from requested SUT!"
);
setverdict
(
fail
,
__SCOPE__
&
" : Timeout due to no response received from requested SUT!"
);
...
@@ -2070,79 +2018,21 @@ module OneM2M_Testcases_AE_Release_1 {
...
@@ -2070,79 +2018,21 @@ module OneM2M_Testcases_AE_Release_1 {
function
f_AE_SUB_NTF_002
()
runs
on
CseSimu
system
AeSystem
{
function
f_AE_SUB_NTF_002
()
runs
on
CseSimu
system
AeSystem
{
//variables
//variables
var
template
UtTriggerPrimitive
v_utRequest
:=
m_utCreateAe
;
var
integer
v_aeLocalIndex
:=
-
1
;
var
MsgIn
v_request
;
var
RequestPrimitive
v_req
;
var
ResponsePrimitive
v_responsePrimitive
;
var
PrimitiveContent
v_localResource
;
var
integer
v_parentIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
PrimitiveContent
v_resource
;
var
universal
charstring
v_action
:=
__SCOPE__
&
": Please, send a valid AE Registration CREATE Request"
;
// Test component configuration
f_cf03Up
();
f_cf03Up
();
//create Ae
// Preamble
v_utRequest
.
requestPrimitive
.
to_
:=
f_getLocalResourceAddress
();
// create Ae
f_sendUtPrimitive
(
v_utRequest
,
v_action
);
v_aeLocalIndex
:=
f_ae_preamble_registerAe
();
tc_ac
.
start
;
alt
{
[]
mcaPortIn
.
receive
(
mw_request
(
mw_createAe
))
->
value
v_request
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
" : AE registration request is accepted!!"
);
v_parentIndex
:=
f_getLocalResourceIndex
(
v_request
.
primitive
.
requestPrimitive
.
to_
);
v_resource
:=
f_generateLocalResource
(
v_request
.
primitive
.
requestPrimitive
.
primitiveContent
,
v_parentIndex
,
v_request
.
primitive
.
requestPrimitive
.
resourceType
);
v_resourceIndex
:=
f_setLocalResource
(
v_resource
,
v_request
.
primitive
.
requestPrimitive
.
resourceType
,
v_parentIndex
);
v_responsePrimitive
:=
valueof
(
m_responsePrimitive
(
int2001
,
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
,
vc_localResourcesList
[
v_resourceIndex
].
resource
));
//send back responsePrimitive
f_send
(
e_mca_in_port
,
m_response
(
v_responsePrimitive
));
}
[]
mcaPortIn
.
receive
(
mw_request
(
mw_createAe
(
*
,
?
,
m_contentCreateAe_Invalid
)))
->
value
v_request
{
tc_ac
.
stop
;
setverdict
(
inconc
,
__SCOPE__
&
" : AE registration request is rejected due to not including mandatory attributes!!"
);
f_send
(
e_mca_in_port
,
m_response
(
valueof
(
m_responsePrimitive
(
int4004
,
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
,
omit
))));
}
[]
tc_ac
.
timeout
{
setverdict
(
inconc
,
__SCOPE__
&
" : Timeout due to no response received from requested SUT!"
);
}
}
f_checkCseSimuStatus
();
//create Subscription
v_utRequest
:=
m_utCreateSubscription
;
v_utRequest
.
requestPrimitive
.
to_
:=
f_getLocalResourceAddress
(
v_resourceIndex
);
v_action
:=
"Please, send a valid CREATE request for Subscription"
;
f_sendUtPrimitive
(
v_utRequest
,
v_action
);
tc_ac
.
start
;
alt
{
[]
mcaPortIn
.
receive
(
mw_request
(
mw_createSubscription
))
->
value
v_request
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
" : Subscription creation request is accepted!"
);
v_parentIndex
:=
f_getLocalResourceIndex
(
v_request
.
primitive
.
requestPrimitive
.
to_
);
v_resource
:=
f_generateLocalResource
(
v_request
.
primitive
.
requestPrimitive
.
primitiveContent
,
v_parentIndex
,
v_request
.
primitive
.
requestPrimitive
.
resourceType
);
v_resourceIndex
:=
f_setLocalResource
(
v_resource
,
v_request
.
primitive
.
requestPrimitive
.
resourceType
,
v_parentIndex
);
v_responsePrimitive
:=
valueof
(
m_responsePrimitive
(
int2001
,
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
,
vc_localResourcesList
[
v_resourceIndex
].
resource
));
//send back responsePrimitive
f_send
(
e_mca_in_port
,
m_response
(
v_responsePrimitive
));
}
[]
mcaPortIn
.
receive
{
tc_ac
.
stop
;
setverdict
(
inconc
,
__SCOPE__
&
" : Subscription creation request is rejected due to not including mandatory attributes!!"
);
f_send
(
e_mca_in_port
,
m_response
(
valueof
(
m_responsePrimitive
(
int4004
,
v_request
.
primitive
.
requestPrimitive
.
requestIdentifier
,
omit
))));
}
[]
tc_ac
.
timeout
{
setverdict
(
inconc
,
__SCOPE__
&
" : Timeout due to no response received from requested SUT!"
);
}
}
f_checkCseSimuStatus
();
//Test behavior
//Test behavior
f_send
(
e_mca_port
,
m_request
(
m_notifyAggregatedNotification
));
v_req
:=
valueof
(
m_notifyAggregatedNotification
);
v_req
.
from_
:=
PX_TS_CSE1
.
cseId
;
f_send
(
e_mca_port
,
m_request
(
v_req
));
tc_ac
.
start
;
tc_ac
.
start
;
alt
{
alt
{
...
@@ -2150,9 +2040,13 @@ module OneM2M_Testcases_AE_Release_1 {
...
@@ -2150,9 +2040,13 @@ module OneM2M_Testcases_AE_Release_1 {
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
" : Notification response is accepted!"
);
setverdict
(
pass
,
__SCOPE__
&
" : Notification response is accepted!"
);
}
}
[]
mcaPort
.
receive
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
" : Notification response with wrong response status code"
);
}
[]
mcaPort
.
receive
(
mw_response
(
?
))
{
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
" : Notification response
is rejected due to not including mandatory attributes!
"
);
setverdict
(
fail
,
__SCOPE__
&
" :
Unexpected
Notification response"
);
}
}
[]
tc_ac
.
timeout
{
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
" : Timeout due to no response received from requested SUT!"
);
setverdict
(
fail
,
__SCOPE__
&
" : Timeout due to no response received from requested SUT!"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment