We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
Hello Everyone,
I am taking data from excel sheet for that I am using data source. I have written groovy script for asserting response. I want get status of groovy scripts status as pass or fail and I need to pass that status into the same excel sheet.
Please help me with solution
Hi,
I use one Groovy script per condition to test. In my own main test suite, I have approx. 20 groovy scripts.
I suppose you could return an array from your groovy script where each element is a condition test and then update your datasink step to reference the element of interest. Not tried, but I imagine it's possible. You could also return a JSON object from the Groovy script. E.g.
[
{
"surname": "Scholes",
"forename": "Paul",
"surnameCheckResult": "PASS",
"forenameCheckResult": "FAIL"
}
]And then reference the values in the Datasink... E.g.
${MyCheck#result.someConditionName}Again, not sure if this would work.
Is there any other way by which we can pass pass/fail depends on groovy script status to excel sheet?
Regads
Rupam