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

Сan run the tests in headless web browsers.

2 Answers 122 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vitaliy
Top achievements
Rank 1
Vitaliy asked on 09 Sep 2014, 07:22 PM
Hello, I'm wondering whether it is possible to write tests for my web silverlight application using headless web browsers and telerik test framework.
1) I know that telerik test framework is BrowserType.AspNetHost but I am unsure whether it is possible in this mode to test the silverlight application?
2) And I do not quite understand why you need to specify the path to the source code 'settings.WebAppPhysicalPath = @ "D:\...\Web"; '?
3) Also, I have seen SilverlightApplicationPath but I can not understand in what cases it is applied?
4) My test application written in Asp.net MVC and it is tightly associated with silverlight, using BrowserType.InternetExplorerr can achieve the desired but will it all work correctly in BrowserType.AspNetHost, I did not get because in the first case, we specify a full url and secondly the relative path to the project, or am I doing something wrong? And if the tests will be run on a separate server and will not have access to the project files?

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 12 Sep 2014, 04:14 PM
Hello Vitaliy,

The very short and quick answer is no you cannot use BrowserType.AspNetHost to test your Silverlight application. Net let me try to explain why:

The AspNetHost is a special headless feature that comes with Visual Studio and can only be used to test an HTML based application which does not depend on JavaScript or Silverlight. This AspNetHost does not include a JavasScript run time engine nor a Silverlight run time engine.

Even if it did, to automate a Silverlight application requires use of the mouse and keyboard. If there's no UI, you cannot click on buttons (links, dropdowns, etc.) or enter text into input fields.

I'm sorry but I don't believe it's possible to test a Silverlight application headless. A visible fully interactactive UI is required.

For the other questions you asked:

Item 1) Answered above

Item 2) The path is required by the Visual Studio AspNetHost component. It will go to this path and load the application from that path into it's headless component.

Item 3) The SilverlightApplicationPath is only used when testing a Silverlight Out Of Browser application, one that has been installed on the machine and doesn't use the browser to run.

Item 4) Hopefully the reason this doesn't work is explained above already.

Regards,
Cody
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Vitaliy
Top achievements
Rank 1
answered on 15 Sep 2014, 05:46 AM
Hi Cody,

Thank you very much.
Tags
General Discussions
Asked by
Vitaliy
Top achievements
Rank 1
Answers by
Cody
Telerik team
Vitaliy
Top achievements
Rank 1
Share this question
or