Hi,
I am facing a problem to parse the below datastructure,basically its an array of hashes.All i want to do is write a script which will access testcase1 and perform each steps in an order. I need to access step1 from testcase1 and trigger the command with the given parameters , the command here is the name of a function module which is a part of another perl script which i have written and the parameters are the arguments for my function. Once step1 is completed i need to perform step2 on my application, i also need a way to synchronise my steps every step has to be executed based on the return status of the previous step or result of the previous step. If step1 fails it has to exit and should not perform step2. After testcase1 is executed it has to goto testcase2 and perform the operations. Can anyone please suggest me how i can implement a solution for this.?Looking forward for your help
@VAR1 = {
'testcase1' => {
'step1' => {
'command' => 'Launchapplication ',
'param1' => 'executablepath',
'param2' => 'dirpath'
},
'step2' => {
'command' => 'SelectMenu'
},
'step3' => {
'command' => 'Changemode',
'param1' => '100'
},
'step4' => {
'command' => 'CaptureRectanlge',
'param1' => '3',
'param2' => '96',
'param3' => '726',
'param4' => '580'
},
'step5' => {
'command' => 'CompareImage',
'image1' => 'D:\\\\img1.jpg',
'image2' => 'D:\\\\img2.jpg '
}
},
'testcase2' => {
'step1' => {
'command' => 'Launchapplication ',
'param1' => 'executablepath',
'param2' => 'dirpath'
},
'step2' => {
'command' => 'Dothis'
},
'step3' => {
'command' => 'Changemode',
'param1' => '100'
},
'step4' => {
'command' => 'CaptureRectanlge',
'param1' => '3',
'param2' => '96',
'param3' => '726',
'param4' => '580'
},
'step5' => {
'command' => 'CompareImage',
'image1' => 'D:\\\\img1.jpg',
'image2' => 'D:\\\\img2.jpg '
}
}