I have followed the steps mentioned in http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/general/execution-extensions.aspx
Create a Class Library
Added the necesssary references
Below is the Code:
It is the same as given in the above link.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Data;
using System.Data.OleDb;
using System.Windows.Forms;
using ArtOfTest.WebAii.Design.Execution;
namespace ClassLibrary1
{
public class Class1 : IExecutionExtension
{
public void OnAfterTestCompleted(ExecutionContext executionContext, TestResult result)
{
}
public void OnBeforeTestStarted(ExecutionContext executionContext, ArtOfTest.WebAii.Design.ProjectModel.Test test)
{
}
public DataTable OnInitializeDataSource(ExecutionContext executionContext)
{
return null;
}
public void OnStepFailure(ExecutionContext executionContext, ArtOfTest.WebAii.Design.AutomationStepResult stepResult)
{
}
public void OnAfterTestListCompleted(RunResult result)
{
string msg = string.Format("TestList '{0}' completed on '{1}'. ({2}/{3}) Passed", result.Name, result.EndTime, result.PassedCount, result.TestResults.Count);
StreamWriter file = new StreamWriter("c:\\test-list-results.txt");
file.WriteLine(msg);
file.Close();
}
public void OnBeforeTestListStarted(TestList list)
{
}
}
}
I have build the code and copied the dll ClassLibrary1.dll to bin folder of Telerik.
Also add the ClassLibrary1.dll in the refernces of Telerik.
Still the OnAfterTestListCompleted is not getting invoked
Create a Class Library
Added the necesssary references
Below is the Code:
It is the same as given in the above link.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Data;
using System.Data.OleDb;
using System.Windows.Forms;
using ArtOfTest.WebAii.Design.Execution;
namespace ClassLibrary1
{
public class Class1 : IExecutionExtension
{
public void OnAfterTestCompleted(ExecutionContext executionContext, TestResult result)
{
}
public void OnBeforeTestStarted(ExecutionContext executionContext, ArtOfTest.WebAii.Design.ProjectModel.Test test)
{
}
public DataTable OnInitializeDataSource(ExecutionContext executionContext)
{
return null;
}
public void OnStepFailure(ExecutionContext executionContext, ArtOfTest.WebAii.Design.AutomationStepResult stepResult)
{
}
public void OnAfterTestListCompleted(RunResult result)
{
string msg = string.Format("TestList '{0}' completed on '{1}'. ({2}/{3}) Passed", result.Name, result.EndTime, result.PassedCount, result.TestResults.Count);
StreamWriter file = new StreamWriter("c:\\test-list-results.txt");
file.WriteLine(msg);
file.Close();
}
public void OnBeforeTestListStarted(TestList list)
{
}
}
}
I have build the code and copied the dll ClassLibrary1.dll to bin folder of Telerik.
Also add the ClassLibrary1.dll in the refernces of Telerik.
Still the OnAfterTestListCompleted is not getting invoked