import groovy.json.JsonSlurper def res = context.expand( '${Get_Period_Id#Response}' ) log.info res def jsonsl = new JsonSlurper().parseText(res) def packs = context.expand( '${Get_Period_Id#Response#$[\'dependencies\'][1][\'pack_id\']}' ) log.info packs if (packs =="journals|0_0_7|JOURNALS_PART_ONE") { def packs1 = context.expand( '${Get_Period_Id#Response#$[\'dependencies\'][1][\'id\']}' ) log.info packs1 testRunner.testCase.testSuite.testCases["Post_Profiling_dag"].setPropertyValue("id for Journals_one",packs1) } else { def packs2= context.expand( '${Get_Period_Id#Response#$[\'dependencies\'][2][\'id\']}' ) log.info packs2 testRunner.testCase.testSuite.testCases["Post_Profiling_dag"].setPropertyValue("id for Journals_one",packs2) }