Unable to run XamlSampleTests

2 posts, 0 answers
  1. Arooj
    Arooj avatar
    4 posts
    Member since:
    May 2011

    Posted 19 Jul 2011 Link to this post

    Hi,

    I've installed the Telerik testing framework and opened one of the test projects "XamlSampleTests" in VS2010. It compiles successfully. When i run it all the tests fail. The first one it runs is the WindowStateTest it fails on this line.
    Assert.IsTrue(window.IsOpen, "The window should be initially opened!");

    It throws an exception that the assert failed. I can't figure out how it failed. I'm able to see the IE open and access the test website. I've also tried to run VS2010 under administrator account. That doesn't work either. Are there any prerequisites for running the test program?

    Also i had to remove the ArtOfTest.Common dll from the references in order to compile the program successfully. I was not able to find the dll in the framework installer package.

    Thanks. Regards,
    Arooj
  2. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 25 Jul 2011 Link to this post

    Hello Arooj,

    Lots of these sample tests are not passing either because of changes in the examples or wrappers. In the case of RadWindow the First look of the Silverlight demos which the tests are using is completely new and the tests are not edited accordingly. The purpose of this tests is to show the API of the control wrapper, so keeping them all green is with not that high priority. I would advise you to just take a look at the code that is used in the sample tests and give it a try in your own tests on a chosen demo or own test application.

    The problem in the test you mentioned is that the RadWIndow is not properly detected as the example is changed and its Visual tree as well. In the old example the window was of type RadWindow, now it is a User Control that inherits from RadWindow and that is causing the test to fail. You can check this forum thread how you can find such elements in the VisualTree in order to use the Telerik wrappers.

    If you are new to the Framework I advice you to create a simple application without inherited controls etc. and try to write a test using the API. You can also add x:Name on the controls in your application in order find them more easily in the visual tree by using this.app.VisualTree.Find.ByName method.

    Hope I was helpful. Please let me know if you have further questions.

    All the best,
    Boyan
    the Telerik team
    Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

    Have you looked at the new Online User Guide for Telerik Test Studio?
Back to Top