Forum Discussion
deepesh_jain
15 years agoFrequent Contributor
Hi Jenny,
For second question, testStepResult is not a class, its an interface. So you can't create an empty object, however, you can access an its object, if some method returns an object of this type. For example:
def abc = testRunner.runTestStepByName("YOUR_TEST_STEP_NAME") ;
abc will hold an object of "testStepResult" type. You can now invoke methods on this object like:
def stats = abc.getStatus();
Thanks,
Deepesh Jain
For second question, testStepResult is not a class, its an interface. So you can't create an empty object, however, you can access an its object, if some method returns an object of this type. For example:
def abc = testRunner.runTestStepByName("YOUR_TEST_STEP_NAME") ;
abc will hold an object of "testStepResult" type. You can now invoke methods on this object like:
def stats = abc.getStatus();
Thanks,
Deepesh Jain