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
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).
Anthony
the Telerik team
Test Studio Trainings
Then is there any other way by which I will come to know this is start & end of a test list in VS?
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.
Anthony
the Telerik team
Test Studio Trainings
- 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 . - Where can i get this dll file.
- 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
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.
Anthony
the Telerik team
Test Studio Trainings
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
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,
the Telerik team
Test Studio Trainings
Thanks for your quick response again.
Regards,
Pankaj
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