Telerik Forums
Testing Framework Forum
1 answer
79 views

Hi,

 I was trying to run automated tests on Windows 8 but it doesn't look to be able to run on IE or Forefox, IE opens but freezes there I can't do any action on it, FF doesn't even open, Chrome looks to work perfectly.

Ivaylo
Telerik team
 answered on 12 May 2015
1 answer
132 views

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.

Boyan Boev
Telerik team
 answered on 30 Apr 2015
8 answers
142 views
this code throws an serialization error only in FF, this works just fine in chrome/IE
                    result = Actions.InvokeScript<string>("document.activeElement.id");

error:

System.Runtime.Serialization.SerializationException: There was an error deserializing the object of type System.String. End element 'root' from namespace '' expected. Found element '__ko__1427881981050' from namespace ''. ---> System.Xml.XmlException: End element 'root' from namespace '' expected. Found element '__ko__1427881981050' from namespace ''.
   at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3)
   at System.Xml.XmlExceptionHelper.ThrowEndElementExpected(XmlDictionaryReader reader, String localName, String ns)
   at System.Xml.XmlBaseReader.ReadEndElement()
   at System.Xml.XmlBaseReader.ReadElementContentAsString()
   at System.Runtime.Serialization.XmlReaderDelegator.ReadElementContentAsString()
   at System.Runtime.Serialization.Json.JsonStringDataContract.ReadJsonValueCore(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context)
   at System.Runtime.Serialization.Json.JsonDataContract.ReadJsonValue(XmlReaderDelegator jsonReader, XmlObjectSerializerReadContextComplexJson context)
   at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName)
   at System.Runtime.Serialization.XmlObjectSerializer.InternalReadObject(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   --- End of inner exception stack trace ---
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(XmlDictionaryReader reader)
   at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(Stream stream)
   at ArtOfTest.WebAii.Core.Actions.InvokeScript[T](String script)
Ivaylo
Telerik team
 answered on 21 Apr 2015
2 answers
138 views

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.

William
Top achievements
Rank 1
 answered on 21 Apr 2015
23 answers
463 views
Hello experts,

I'm trying my first sample test for google.com. I was able to record and playback tests from Test Sturio. However, we wanted to build our own framework. So started looking at the telrik API. I was completely struck with the below issue and was not able to proceed further

{           
            Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
            ActiveBrowser.NavigateTo("http://www.google.com"); //Was able to open the browser
            Console.WriteLine("Title of the page :" + ActiveBrowser.PageTitle); // Able to get the title of the browser
             
            // HtmlInputText textBox = ActiveBrowser.Find.ById<HtmlInputText>("gbqfq");
            Find.ByExpression<HtmlInputText>("id=?_gbqfq"); //This is where I'm getting the System.NullReferenceException  : Object reference not set to an instance of object

}

I'm struck at this point. Need your urgent help as I need to give a POC demo.

Regards,
Kiran



Ivaylo
Telerik team
 answered on 14 Apr 2015
4 answers
655 views

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>

Evgeniy
Top achievements
Rank 1
 answered on 10 Apr 2015
3 answers
330 views

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
Boyan Boev
Telerik team
 answered on 03 Apr 2015
5 answers
936 views
Hello, I'm wondering what is the difference between those two methods mentioned above?  Is the .Click() method executed via Javascript?  What about the .MouseClick() method..does it not use javascript.

If I use the .MouseClick() event, does that mean that the browser has to to have top most focus on it while executing the tests?  Does that also mean that a user has to be logged in and the browser can't be minimized while the tests are running.

Please help me understand the difference at the low technical level...why would I prefer one over the other?  If I use the .MouseClick() method will I see the mouse cursor actually moving over to the UI element that it's about to interact with?

Regards,

Humberto
Cody
Telerik team
 answered on 02 Apr 2015
3 answers
169 views
Hi,

I've come across this issue when running tests on our build server :

ArtOfTest.WebAii.Exceptions.UnsupportedNonInteractiveOperationException : Using the Desktop object is prohibited when running in non-interactive mode. Follow the link for more information: http://docs.telerik.com/teststudio/user-guide/knowledge-base/test-execution/no-tests-execute-on-locked-machine.aspx

I didn't tried all the solutions using Remote Desktop sessions and VNC yet.  

In the documentation page above, it is mentioned : "Any test that requires moving the mouse or sending key strokes requires an unlocked desktop."  So, what I'd like to know is what are the methods and objects I should avoid when not running on interactive mode.  

Regards,
Martin
Ivaylo
Telerik team
 answered on 02 Apr 2015
0 answers
107 views
Hello,

This is in regards to support ticket 910420.
Humberto
Top achievements
Rank 1
 asked on 31 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?