Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ATS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TST
ATS
Commits
bd221859
Commit
bd221859
authored
9 years ago
by
Miguel Angel Reina Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Add TC_CSE_DMR_UPD_BO_005
parent
459148da
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
OneM2M_Testcases.ttcn
+153
-0
153 additions, 0 deletions
OneM2M_Testcases.ttcn
with
153 additions
and
0 deletions
OneM2M_Testcases.ttcn
+
153
−
0
View file @
bd221859
...
@@ -1911,6 +1911,159 @@ module OneM2M_Testcases {
...
@@ -1911,6 +1911,159 @@ module OneM2M_Testcases {
}
// end g_CSE_DMR_UPD_BV_004
}
// end g_CSE_DMR_UPD_BV_004
group
g_CSE_DMR_UPD_BO_005
{
testcase
TC_CSE_DMR_UPD_BV_005_01
()
runs
on
M2M
system
M2MSystem
{
// Local variables
var
Labels
v_labels_1
:=
{
"VALUE_1"
};
var
Labels
v_labels_2
:=
{
"VALUE_2"
};
var
AcpType
v_acp
:=
{
"ACP_ID"
};
var
XSD
.
NonNegativeInteger
v_maxNrOfInstances
:=
5
;
var
template
RequestPrimitive
v_createRequest
:=
m_createContainerBase
;
var
template
RequestPrimitive
v_updateRequest
:=
m_updateContainerBase
;
v_createRequest
.
content
.
any_1
[
0
].
Container_create
.
labels
:=
v_labels_1
;
v_createRequest
.
content
.
any_1
[
0
].
Container_create
.
maxNrOfInstances
:=
v_maxNrOfInstances
;
v_updateRequest
.
content
.
any_1
[
0
].
Container_update
.
labels
:=
v_labels_2
;
v_updateRequest
.
content
.
any_1
[
0
].
Container_update
.
maxNrOfInstances
:=
0
;
//TODO
v_updateRequest
.
content
.
any_1
[
0
].
Container_update
.
accessControlPolicyIDs
:=
v_acp
;
f_CSE_DMR_UPD_BO_005
(
int3
,
v_createRequest
,
v_updateRequest
);
//Container
}
testcase
TC_CSE_DMR_UPD_BV_005_02
()
runs
on
M2M
system
M2MSystem
{
// Local variables
var
Labels
v_labels_1
:=
{
"VALUE_1"
};
var
Labels
v_labels_2
:=
{
"VALUE_2"
};
var
AcpType
v_acp
:=
{
"ACP_ID"
};
var
XSD
.
String
v_groupName
:=
"MyGroupName"
;
var
template
RequestPrimitive
v_createRequest
:=
m_createGroupBase
;
var
template
RequestPrimitive
v_updateRequest
:=
m_updateGroupBase
;
v_createRequest
.
content
.
any_1
[
0
].
Group_create
.
labels
:=
v_labels_1
;
v_createRequest
.
content
.
any_1
[
0
].
Group_create
.
groupName
:=
"MyGroupName"
;
v_updateRequest
.
content
.
any_1
[
0
].
Group_update
.
labels
:=
v_labels_2
;
v_updateRequest
.
content
.
any_1
[
0
].
Group_update
.
groupName
:=
""
;
//TODO Set to NULL
v_updateRequest
.
content
.
any_1
[
0
].
Group_update
.
accessControlPolicyIDs
:=
v_acp
;
f_CSE_DMR_UPD_BO_005
(
int9
,
v_createRequest
,
v_updateRequest
);
//Group
}
testcase
TC_CSE_DMR_UPD_BV_005_03
()
runs
on
M2M
system
M2MSystem
{
// Local variables
var
Labels
v_labels_1
:=
{
"VALUE_1"
};
var
Labels
v_labels_2
:=
{
"NULL"
};
var
template
RequestPrimitive
v_createRequest
:=
m_createAcpBase
;
var
template
RequestPrimitive
v_updateRequest
:=
m_updateAcpBase
;
v_createRequest
.
content
.
any_1
[
0
].
ACP_create
.
labels
:=
v_labels_1
;
//v_createRequest.content.any_1[0].ACP_create.groupName := "MyGroupName";TODO Need to find Attribute 2
v_updateRequest
.
content
.
any_1
[
0
].
ACP_update
.
labels
:=
v_labels_2
;
//v_updateRequest.content.any_1[0].ACP_update.groupName:= "";//TODO Set to NULL
//v_updateRequest.content.any_1[0].ACP_update.accessControlPolicyIDs := v_acp; TODO Need to find Attribute 3
f_CSE_DMR_UPD_BO_005
(
int1
,
v_createRequest
,
v_updateRequest
);
//AccessControlPolicy
}
testcase
TC_CSE_DMR_UPD_BV_005_04
()
runs
on
M2M
system
M2MSystem
{
// Local variables
var
Labels
v_labels_1
:=
{
"VALUE_1"
};
var
Labels
v_labels_2
:=
{
"NULL"
};
var
template
RequestPrimitive
v_createRequest
:=
m_createScheduleBase
;
var
template
RequestPrimitive
v_updateRequest
:=
m_updateScheduleBase
;
v_createRequest
.
content
.
any_1
[
0
].
Schedule_create
.
labels
:=
v_labels_1
;
//v_createRequest.content.any_1[0].Schedule_create.groupName := "MyGroupName";TODO Need to find Attribute 2
v_updateRequest
.
content
.
any_1
[
0
].
Schedule_update
.
labels
:=
v_labels_2
;
//v_updateRequest.content.any_1[0].Schedule_update.groupName:= "";//TODO Set to NULL
//v_updateRequest.content.any_1[0].Schedule_update.accessControlPolicyIDs := v_acp; TODO Need to find Attribute 3
f_CSE_DMR_UPD_BO_005
(
int18
,
v_createRequest
,
v_updateRequest
);
//Schedule
}
testcase
TC_CSE_DMR_UPD_BV_005_05
()
runs
on
M2M
system
M2MSystem
{
// Local variables
var
Labels
v_labels_1
:=
{
"VALUE_1"
};
var
Labels
v_labels_2
:=
{
"NULL"
};
var
AcpType
v_acp
:=
{
"ACP_ID"
};
var
template
RequestPrimitive
v_createRequest
:=
m_createPollingChannelBase
;
var
template
RequestPrimitive
v_updateRequest
:=
m_updatePollingChannelBase
;
v_createRequest
.
content
.
any_1
[
0
].
PollingChannel_create
.
labels
:=
v_labels_1
;
//v_createRequest.content.any_1[0].PollingChannel_create.groupName := "MyGroupName";TODO Need to find Attribute 2
v_updateRequest
.
content
.
any_1
[
0
].
PollingChannel_update
.
labels
:=
v_labels_2
;
//v_updateRequest.content.any_1[0].PollingChannel_update.groupName:= "";//TODO Set to NULL
v_updateRequest
.
content
.
any_1
[
0
].
PollingChannel_update
.
accessControlPolicyIDs
:=
v_acp
;
f_CSE_DMR_UPD_BO_005
(
int15
,
v_createRequest
,
v_updateRequest
);
//PollingChannel
}
testcase
TC_CSE_DMR_UPD_BV_005_06
()
runs
on
M2M
system
M2MSystem
{
// Local variables
var
Labels
v_labels_1
:=
{
"VALUE_1"
};
var
Labels
v_labels_2
:=
{
"NULL"
};
var
AcpType
v_acp
:=
{
"ACP_ID"
};
var
template
RequestPrimitive
v_createRequest
:=
m_createSubscriptionBase
;
var
template
RequestPrimitive
v_updateRequest
:=
m_updateSubscriptionBase
;
v_createRequest
.
content
.
any_1
[
0
].
Subscription_create
.
labels
:=
v_labels_1
;
v_createRequest
.
content
.
any_1
[
0
].
Subscription_create
.
expirationCounter
:=
5
;
v_updateRequest
.
content
.
any_1
[
0
].
Subscription_update
.
labels
:=
v_labels_2
;
v_updateRequest
.
content
.
any_1
[
0
].
Subscription_update
.
expirationCounter
:=
1
;
//TODO Set to NULL
v_updateRequest
.
content
.
any_1
[
0
].
Subscription_update
.
accessControlPolicyIDs
:=
v_acp
;
f_CSE_DMR_UPD_BO_005
(
int23
,
v_createRequest
,
v_updateRequest
);
//Subscription
}
function
f_CSE_DMR_UPD_BO_005
(
ResourceType
p_resourceType
,
template
RequestPrimitive
p_createRequestPrimitive
,
template
RequestPrimitive
p_updateRequestPrimitive
)
runs
on
M2M
{
// Local variables
var
M2MResponsePrimitive
v_response
;
var
RequestPrimitive
v_request
;
var
XSD
.
ID
v_resourceId_content
;
var
XSD
.
String
v_resourceName
:=
"myResource"
;
var
XSD
.
String
v_aeName
:=
"ae_test"
;
var
XSD
.
String
v_aeResourceAddress
:=
"/"
&
PX_CSE_NAME
&
"/"
&
v_aeName
;
var
XSD
.
String
v_targetResourceAddress
:=
"/"
&
PX_CSE_NAME
&
"/"
&
v_aeName
&
"/"
&
v_resourceName
;
// Test control
// Test component configuration
f_cf01Up
();
// Test adapter configuration
// Preamble
f_preamble_registerAe
(
v_aeName
,
int63
);
//c_CRUDNDi);
f_createResource
(
p_resourceType
,
v_aeResourceAddress
,
v_resourceName
,
p_createRequestPrimitive
);
// Test Body
v_request
:=
f_getUpdateRequestPrimitive
(
p_resourceType
,
v_targetResourceAddress
,
v_resourceName
,
p_updateRequestPrimitive
);
mcaPort
.
send
(
m_request
(
v_request
));
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_responseOK
)
->
value
v_response
{
tc_ac
.
stop
;
setverdict
(
pass
,
testcasename
()
&
": Attribute of resource type "
&
int2str
(
enum2int
(
p_resourceType
))
&
" updated successfuly"
);
//TODO: Check that name attribute is provided
}
[]
mcaPort
.
receive
(
mw_responseKO
)
{
tc_ac
.
stop
;
setverdict
(
fail
,
testcasename
()
&
": Error while updating resource type "
&
int2str
(
enum2int
(
p_resourceType
)));
}
[]
tc_ac
.
timeout
{
setverdict
(
inconc
,
testcasename
()
&
": No answer while updating resource type "
&
int2str
(
enum2int
(
p_resourceType
)));
}
}
// Postamble
f_postamble_deleteResources
(
v_aeName
);
}
//end f_CSE_DMR_UPD_BO_005
}
// end g_CSE_DMR_UPD_BO_005
}
//end group Update
}
//end group Update
}
//end group Data_Management_and_Repository
}
//end group Data_Management_and_Repository
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment