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

Execution Extensions

9 Answers 148 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ninja
Top achievements
Rank 1
Ninja asked on 04 Apr 2012, 07:20 AM
Hi All,

I am using Execution Extensions to do some setup and cleanup type of activity for test & test list execution.
Code from OnBeforeTestStarted(),OnAfterTestCompleted() and OnInitializeDataSource() is properly executing but code from OnBeforeTestListStarted() and OnAfterTestListCompleted() is not executing.Simply I have added code to write log to text file but it is not happening because I think OnBeforeTestListStarted() & OnAfterTestListCompleted() is not getting executed. The same is working fine with OnBeforeTestStarted() & OnAfterTestCompleted(). Am I missing something here?

I have created one test list and I am trying to execute this test list with VS's Start Debugging(F5) option.
My Test Studio version is 2011.2.1413.0 & I am using VS 2010 for development.

9 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 04 Apr 2012, 03:44 PM
Hello,

OnBeforeTestListStarted and OnAfterTestListCompleted are only applicable to Test Studio Test Lists.

You're using a Visual Studio Test List, which is why it's not working (which is expected).

All the best,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
John
Top achievements
Rank 1
answered on 04 Apr 2012, 04:00 PM
Thanx Anthony for your quick reply.

Then is there any other way by which I will come to know this is start & end of a test list in VS?
0
Anthony
Telerik team
answered on 04 Apr 2012, 05:13 PM
Hello John,

There may be, but I don't have any information on that process. If it exists, it's beyond the scope of Test Studio code.

All the best,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Pankaj
Top achievements
Rank 1
answered on 10 May 2012, 12:39 PM
  1. Hi

    I was trying to use the OnAfterTestCompleted() method but I am not getting the "ArtOfTest.WebAii.Design.dll" file in the %ProgramFiles%\Telerik\Test Studio\Bin\ path .
  2. Where can i get this dll file.
  3. If possible can anyone share this dll file to me.

I am using VS2010 ultimate for development and using "Telerik_Testing_Framework_2012_1_411_FREE_EDITION.msi"
version of testing framework. I have not installed Test Studio.

Thanks,
Pankaj KUkkar

0
Anthony
Telerik team
answered on 10 May 2012, 05:59 PM
Hello Pankaj,

That DLL is only included with Test Studio Standalone version and VS plugin. It is not included with Telerik Testing Framework.

Furthermore, methods such as OnAfterTestCompleted only apply in the context of Test Studio tests, and not to purely coded tests written with the Framework.

All the best,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Pankaj
Top achievements
Rank 1
answered on 11 May 2012, 05:51 AM
Hello Anthony,

Thanks for quick reply.
Is there any way to get the test method execution result and Test Method Name while Test Method execution is over?
or is there any work around to store or export the test method or test list execution results into excel sheets from VS ?
I just want to store the execution result to an excel sheet automatically whenever execution is completed.
Please let me know if you have any suggestions on this.


Thanks and Regards,
Pankaj Kukkar
0
Anthony
Telerik team
answered on 11 May 2012, 05:45 PM
Hello Pankaj,

I must defer to my previous response in the thread:

There may be, but I don't have any information on that process. If it exists, it's beyond the scope of Test Studio code. 

Greetings,

Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Pankaj
Top achievements
Rank 1
answered on 14 May 2012, 06:11 AM
Hello Anthony,

Thanks for your quick response again.

Regards,
Pankaj
0
Pankaj
Top achievements
Rank 1
answered on 15 May 2012, 11:35 AM
Hello Anthony,

I got the answer for my queries. We can get the current test method name and its execution result using the following properties and we can write our own code to write the result and test method name into an excel sheet and we can call this method in the 'MyTestCleanup()' method.

  

I used the following properties.

1.

TestContext.Properties["TestName"]     -> To get the test method name
2. TestContext.CurrentTestOutcome.ToString()      -> To get the execution result 

Thanks and Regards,
Pankaj Kukkar

 

Tags
General Discussions
Asked by
Ninja
Top achievements
Rank 1
Answers by
Anthony
Telerik team
John
Top achievements
Rank 1
Pankaj
Top achievements
Rank 1
Share this question
or