This is a migrated thread and some comments may be shown as answers.

Working with Telerik Test Execution Extension

2 Answers 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
VVP
Top achievements
Rank 2
VVP asked on 21 Sep 2015, 05:52 AM

Hi,

I was working with Telerik test Execution extension following below link.

http://docs.telerik.com/teststudio/advanced-topics/coded-samples/general/execution-extensions

I have added logic to this method  public void OnAfterTestCompleted(ExecutionContext executionContext, TestResult result)​

I was able to print complete log using result.Message statement.

 But I was unable to find any list or collection which holds, test step details.

Now i want to iterate through individual test step contents. I mean, test step execution status, logs pertaining to that test step,test step duration, test step exception etc.

Any way we can achieve this?

Thanks,

VVP

 

2 Answers, 1 is accepted

Sort by
0
Pravallika
Top achievements
Rank 1
answered on 21 Sep 2015, 06:06 AM

Have you checked "result.StepResults" ?

You can store it in a list and iterate through each element of that list.

IList<AutomationStepResult> list = result.StepResults;

foreach(var res in list){

res.<PropertyName> = <something>;

}

Hope this helps.

0
VVP
Top achievements
Rank 2
answered on 21 Sep 2015, 06:53 AM

Hi Pravallika,

Thanks for the reply.

I missed out this "result.StepResults"

I could get TestStepIndex, StepDescription,ResultType and Exception info.

But i also need TestStepName,duration and log messages.

I couldn't find any property names for above .Can you please let me know.

There is one property called "TestName". But it gives the test name and i need Stepname. :)

Thanks,

VVP

Tags
General Discussions
Asked by
VVP
Top achievements
Rank 2
Answers by
Pravallika
Top achievements
Rank 1
VVP
Top achievements
Rank 2
Share this question
or