This is a migrated thread and some comments may be shown as answers.

Unable to run XamlSampleTests

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Arooj
Top achievements
Rank 1
Arooj asked on 19 Jul 2011, 10:58 PM
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

1 Answer, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 25 Jul 2011, 05:40 PM
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?
Tags
General Discussions
Asked by
Arooj
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Share this question
or