Forum Discussion
- Try testCase.getTestStepByName("name").Status - That should give you what you need for request TestSteps
/Nenad
http://eviware.com - Usha_KodaliFrequent ContributorHi,
i tried testCase.getTestStepByName("name").Status.
It says No such property :testCase for class:Script1 - Usha_KodaliFrequent ContributorIn the API i found that there is no Status() method for getTestStepbyName.
We have to use run(testRunner, context).getStatus().
It would be good if we have getStatus() method for getTestStepbyName. - Hi Usha,
Have a look at http://www.eviware.com/blogs/oleblog/?p=442, the status is not part of the TestStep API since a TestStep can be executed multiple times during the execution of a TestCase and the status would thus only be the latest one..
using run.. as you mention will execute the teststep again, maybe you don't want that?
regards!
/Ole
eviware.com - Usha_KodaliFrequent Contributoryeah i dont want to execute the test step...i disabled my step and running through datasink run....
can you tell me workaround? - Hi!
now I don't really understand how you are executing the teststep, but you have the following options to get the status;
1) If the teststep is being executed as part of your testcase, you need to get the corresponding TestStepResult object from the testRunner.results array, this has a status property
2) If the teststep is being executed "manually" by calling its run(..) method from a script, use the TestStepResult returned by that method instead..
does that help? If not, please elaborate on your setup/requirements..
regards!
/Ole
eviware.com - Usha_KodaliFrequent Contributori got the result of teststep..thankyou