qaf icon indicating copy to clipboard operation
qaf copied to clipboard

resolution for Not able to override step.provider.pkg property for data driven scenario

Open infoneershalin opened this issue 7 years ago • 5 comments

resolution for #154

we were using initStep only when step is not yet initiated. we need to re init the step in case fileName is different as step.provider.pkg has changed

infoneershalin avatar Nov 28 '17 15:11 infoneershalin

Will add Unit Testcases soon.

infoneershalin avatar Nov 28 '17 15:11 infoneershalin

Did you understand the issue? Please share the test case. I am afraid that solution will have impact on performance.

cjayswal avatar Nov 28 '17 16:11 cjayswal

Yes, DataDrivenScenario.java creates proxy steps and pass it to execute method of Scenario.java As proxy steps are already initiated before any step executed, the change in step.provider.pkg property by subsequent step does not get reflected. Where as for non DataDrivenScenario steps get initiated one by one and hence change in step.provider.pkg get reflected properly attaching TestProject_ISSUE_154.zip here

infoneershalin avatar Nov 28 '17 16:11 infoneershalin

You can check by commenting step initialization to have lazy initialization in DD scenario

cjayswal avatar Nov 28 '17 17:11 cjayswal

I have tried that. It takes proper step but breaks data passing to step as context does not get set properly,henxe data passed through files is not accessible using ${args[0]}.

On 28-Nov-2017 11:04 PM, cjayswal [email protected] wrote:

You can check by commenting step initializationhttps://github.com/qmetry/qaf/blob/1e70f23256cd813880011934fc7aded9380b8346/src/com/qmetry/qaf/automation/step/client/DataDrivenScenario.java#L183 to have lazy initialization in DD scenario

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/qmetry/qaf/pull/155#issuecomment-347601264, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATpW8HW7I5IVbfL2bvAdHRQn4yn-P5REks5s7EQHgaJpZM4QtZBK.

infoneershalin avatar Nov 28 '17 18:11 infoneershalin