I'm writing a decorator (to implement a Retry attributes for NUnit tests). Everything runs fine when executing with Telerik JustTest -- except:
* "Not Executed" is reported
* Stepping thru in debug, "Run" is never called
Using NUnit 2.6. I have read that Resharper has issues in this same area and there are workarounds. We run Nunit for deployment builds, and I would like to be able to run the tests in VS.
public class RetriedTestMethod : NUnit.Core.Test
{
private readonly int requiredPassCount;
private readonly int tryCount;
private readonly NUnit.Core.Test backingTest;
public RetriedTestMethod(NUnitTestMethod test, int tryCount, int requiredPassCount)
: base((TestName)test.TestName.Clone())
{ //executes in debug
backingTest = test;
this.tryCount = tryCount;
this.requiredPassCount = requiredPassCount;
}
private static bool TestFailed(TestResult result)
{
return result.ResultState == ResultState.Error || result.ResultState == ResultState.Failure;
}
public override TestResult Run(EventListener listener, ITestFilter filter)
{ //Never called
var successCount = 0;
TestResult failureResult = null;
for (var i = 0; i < this.tryCount; i++)
{
var result = backingTest.Run(listener, filter);
if (!TestFailed(result))
{
if (i == 0)
{
return result;
}
if (++successCount >= this.requiredPassCount)
{
return result;
}
}
else
{
failureResult = result;
}
}
return failureResult;
}
I attached the set of files with unit tests.
Recently, I was assigned to fix a test suite which would consistently fail to run all 600 tests after consecutive 5 time-out ones. Now I am quite sure the AutoRefreshDomTree and AutoWaitUntilReady could result in some dead loops by chance.
An article was published on http://www.codeproject.com/Tips/895632/Tips-with-Telerik-Trouble-shooting and I hope that could be helpful for Telerik to improve their powerful testing framework.
Hello.
I'm trying to automate one WPF application, and I need to check if my wpf window has the correct class name. How can I do that?
Here is the part of XAML page code (I need to get class name "Namespace.View".):
<WindowViewBase
x:Class="Namespace.View"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- some controls here -->
</WindowViewBase>
I am evaluating Telerik Test Studio (http://www.telerik.com/automated-testing-tools) as a web regression tool and looking for a how-to on setting up and using of a Page Object Model environment like is possible in Selenium.
http://code.google.com/p/selenium/wiki/PageObjects
The Telerik documentation is focused on record/playback which is very brittle, and my google searches haven't turned up relevant links.
btw, I've cross posted this on stackoverflow http://stackoverflow.com/questions/15034206/how-to-on-implementing-page-object-model-with-telerik-test-studio