freaky007
11 years agoNew Contributor
Pass complex json object from teststep to teststep
hi
i am wondering if there is a way to pass complex json objects, loaded via a GroovyDataSource to test steps.
it seems that storing the json in the test step custom attributes is not working.
small json example, the real ones are 3-5 times bigger.
each main attributes should be used by single test step calling a restful webservice composed out of the data from the json.
>>>>>>
{
"CPEDefaultATAGroup": [
{
"CFS": "AXS-005-xxxxxx",
"Description": "CPEDescription",
"DeviceType": "Media5-Mediatrix4102",
"ForcePIN": "12345678",
"LocationServiceId": "AXS-004-xxxxxx"
},
{
"CFS": "AXS-005-xxxxxx",
"Description": "CPEDescription",
"DeviceType": "Media5-Mediatrix4102",
"ForcePIN": "12345678",
"LocationServiceId": "AXS-004-xxxxxx"
},
{
"CFS": "AXS-005-xxxxxx",
"Description": "CPEDescription",
"DeviceType": "Media5-Mediatrix4102",
"ForcePIN": "12345678",
"LocationServiceId": "AXS-004-xxxxxx"
}
],
"DDI": {
"CFS": "AXS-021-xxxxxx",
"EnterpriseID": 200020,
"PhoneNumberStart": "+41993550310",
"RangeLength": 20
},
"Enterprise": {
"CFS": "AXS-001-xxxxxx",
"City": "Gallizia",
"EnterpriseID": 200020,
"HouseNumber": "42a",
"Name": "Hinkelstein GmbH",
"Street": "Gallierstrasse",
"Zip": "6666"
},
"FirmenIndex": 880088060,
"Groups": [
{
"CFS": "AXS-004-xxxxxx",
"City": "Berlin",
"EnterpriseServiceID": "AXS-001-xxxxxx",
"GroupID": 200021,
"GroupName": "Berlin",
"HouseNumber": "102",
"Scn": 200021,
"Street": "Werkgasse",
"Zip": "12345"
},
{
"CFS": "AXS-004-xxxxxx",
"City": "Biel",
"EnterpriseServiceID": "AXS-001-xxxxxx",
"GroupID": 200022,
"GroupName": "Munich",
"HouseNumber": "10",
"Scn": 200022,
"Street": "Seeweg",
"Zip": "67890"
}
],
"VLAN": {
"CFS": "AXS-003-xxxxxx",
"CVLanID": 403,
"EnterpriseServiceID": "AXS-001-xxxxxx"
},
"tpVoipNrStatus-StammnrGroup": [
{
"EnterpriseServiceId": "AXS-001-K00001",
"PhoneNumber": "+490123456789"
},
{
"EnterpriseServiceId": "AXS-001-K00001",
"PhoneNumber": "+490123456789"
}
],
"User": [
{
"CFS": "AXS-006-xxxxxx",
"Firstname": "Asterix",
"Lastname": "der Gallier",
"ExtensionReservationId": "AXS-004-xxxxxx:311",
"LocationServiceId": "AXS-004-xxxxxx",
"Language": "de"
,"UserCpeRelation": "AXS-005-K00008"
},
{
"CFS": "AXS-006-xxxxxx",
"Firstname": "Obelix",
"Lastname": "der Gallier",
"ExtensionReservationId": "AXS-004-xxxxxx:312",
"LocationServiceId": "AXS-004-xxxxxx",
"Language": "fr"
}
]
,"tpUserCpeRelation-G1U1": [{"CpeServiceId": "AXS-005-K00008", "UserServiceId": "AXS-006-K00007"}, {"CpeServiceId": "AXS-005-K00008", "UserServiceId": "AXS-006-K00007"}]
}
<<<<<<
any idea?
thanks
salids reto
i am wondering if there is a way to pass complex json objects, loaded via a GroovyDataSource to test steps.
it seems that storing the json in the test step custom attributes is not working.
small json example, the real ones are 3-5 times bigger.
each main attributes should be used by single test step calling a restful webservice composed out of the data from the json.
>>>>>>
{
"CPEDefaultATAGroup": [
{
"CFS": "AXS-005-xxxxxx",
"Description": "CPEDescription",
"DeviceType": "Media5-Mediatrix4102",
"ForcePIN": "12345678",
"LocationServiceId": "AXS-004-xxxxxx"
},
{
"CFS": "AXS-005-xxxxxx",
"Description": "CPEDescription",
"DeviceType": "Media5-Mediatrix4102",
"ForcePIN": "12345678",
"LocationServiceId": "AXS-004-xxxxxx"
},
{
"CFS": "AXS-005-xxxxxx",
"Description": "CPEDescription",
"DeviceType": "Media5-Mediatrix4102",
"ForcePIN": "12345678",
"LocationServiceId": "AXS-004-xxxxxx"
}
],
"DDI": {
"CFS": "AXS-021-xxxxxx",
"EnterpriseID": 200020,
"PhoneNumberStart": "+41993550310",
"RangeLength": 20
},
"Enterprise": {
"CFS": "AXS-001-xxxxxx",
"City": "Gallizia",
"EnterpriseID": 200020,
"HouseNumber": "42a",
"Name": "Hinkelstein GmbH",
"Street": "Gallierstrasse",
"Zip": "6666"
},
"FirmenIndex": 880088060,
"Groups": [
{
"CFS": "AXS-004-xxxxxx",
"City": "Berlin",
"EnterpriseServiceID": "AXS-001-xxxxxx",
"GroupID": 200021,
"GroupName": "Berlin",
"HouseNumber": "102",
"Scn": 200021,
"Street": "Werkgasse",
"Zip": "12345"
},
{
"CFS": "AXS-004-xxxxxx",
"City": "Biel",
"EnterpriseServiceID": "AXS-001-xxxxxx",
"GroupID": 200022,
"GroupName": "Munich",
"HouseNumber": "10",
"Scn": 200022,
"Street": "Seeweg",
"Zip": "67890"
}
],
"VLAN": {
"CFS": "AXS-003-xxxxxx",
"CVLanID": 403,
"EnterpriseServiceID": "AXS-001-xxxxxx"
},
"tpVoipNrStatus-StammnrGroup": [
{
"EnterpriseServiceId": "AXS-001-K00001",
"PhoneNumber": "+490123456789"
},
{
"EnterpriseServiceId": "AXS-001-K00001",
"PhoneNumber": "+490123456789"
}
],
"User": [
{
"CFS": "AXS-006-xxxxxx",
"Firstname": "Asterix",
"Lastname": "der Gallier",
"ExtensionReservationId": "AXS-004-xxxxxx:311",
"LocationServiceId": "AXS-004-xxxxxx",
"Language": "de"
,"UserCpeRelation": "AXS-005-K00008"
},
{
"CFS": "AXS-006-xxxxxx",
"Firstname": "Obelix",
"Lastname": "der Gallier",
"ExtensionReservationId": "AXS-004-xxxxxx:312",
"LocationServiceId": "AXS-004-xxxxxx",
"Language": "fr"
}
]
,"tpUserCpeRelation-G1U1": [{"CpeServiceId": "AXS-005-K00008", "UserServiceId": "AXS-006-K00007"}, {"CpeServiceId": "AXS-005-K00008", "UserServiceId": "AXS-006-K00007"}]
}
<<<<<<
any idea?
thanks
salids reto