I am trying to automate a Silverlight web application using CodedUI. The application under test is already developed and deployed in our testing environment.
I tried automating using record feature of CodedUI but was unsuccessful in getting the recorded actions. On googling, I found that I have to install this plugin: https://visualstudiogallery.msdn.microsoft.com/28312a61-9451-451a-990c-c9929b751eb4
I did the installation and still was unable to record. Then I found that I have to reference Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.dll file in the Silverlight project.
This is where I am stuck. I am not sure whether to reference this file in :
The project which was used to develop the Silverlight application
The CodedUI test project.
If it is option 1, I don't have access to the development project. Is there any workaround for this ?
I am pretty sure you only have to reference it in the Coded UI test project. This is how I do it with the DevExpress.CodedUIExtension helper DLL.
Personally I would put the test code next to the application code though, when you version the tests with the application this will make it possible to run tests against a previous and or branched version.
Yes,You need to Refer the AutomationHelper.dll in The project which was used to develop the Silverlight application. I was having same issue way back refering to dll will solve the purpose.
In addition you can refer it with flag to make sure this will not go to production which is a best practice.
Related
I am setting up a unit test bench and as an example exercise created a simple calculator. I'd like to develop test cases for it. When I try to add the project reference to the unit test project an error "Enable to add a reference to project 'Calculator'" appears. No reason or corrective action is provided
Initially I thought the reason was because developer mode was not enabled on my computer. But the problem persists with developer mode on also.
This issue has been resolved. I created a unit test project in .net instead of universal windows application and it worked
I have developed a WPF application and the customer is planning to deploy the application on DVDs.
My application is really simple and doesn't require any setup process, but I need to assure that if the client doesn't have .NET 3 installed that it will be installed locally (from the DVD) before starting the WPF application.
So, what's the easiest was to add the .NET 3/3.5 package locally on my DVD and assure it'll be installed before running my application? Remeber that my application will be a standalone application.
when you use the publish option...
The Project Properties has a place to specify the dependancies that will need to be downloaded
then you simply check the boxes
there are other more complex ways to go abaout this but for .net 3.5 you don't have to go far
I would suggest using Visual Studio Setup Project for creating a setup package which would check for prerequisites and provide fundamental features like file system, registries, scripting. It is very easy to get started with. Take a look here for a brief walkthrough.
I've created a WPF project using MVVM pattern and another project for a web service.
In my WPF project, i've some views and I can navigate between them, everything works.
Now, I want to create a setup with InstallShield, I add project outputs, etc... but when I install the application, the buttons in the main view are not working as if the viewmodels were not include in the setup.
Any ideas ?
Thanks.
Where your installation does not give you the correct results, ask yourself the following questions. Move to the next if you answered 'yes'. If no, then that is a good starting point for your investigation:
Does it work in Release mode on your development PC?
Did the installed application load?
Are all your project outputs present in the installation directory?
Are all the installed files the right version?
Are your configuration files valid?
Have the correct version of the dependencies been installed? (.net version, etc)
I'm creating a Windows 8 Store App. The front-end (main project) of this app is in HTML5/Javascript. And I'm following this guide by Tim Heuer to create a C# WinRT component that wraps SQLite calls and behave as a controller. The front-end calls this component via Javascript, to update data, and get presentation content.
So there are 2 projects in my solution, 'main' in javascript, and 'db' in C#. I've managed to get SQLite working according to the guide. The reason I have this structure is that I'm trying to port an app from iOS to Win8. The 'controller' part is an isolated component from the get-go, and it's already ported to C#.
However, there is one caveat. Because of this known problem, I have to remove the reference to C++ Runtime v11 from the 'db' project to make it compilable. Though it runs fine in the development machine.
Then I got this test machine (samsung xe700t1a to be exact, Intel i5), I discovered that when 'debugging remote' on this test machine, Visual Studio won't deploy SQLite3. As a result, my SQLite calls fail with error: "Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)".
According to the guide I mentioned previously, the point SQLite was made available via WinRT extension, is to make deployment automatic.
I'm wondering why this happens and how to make it correct? I'm also wondering if there's any certification problems for Windows Store for apps in this structure?
I also came across this post and this post suggesting that it's currently not possible to use SQLite in a WinRT component. But it's too late for me to change now, and this project won't be possible without a hybrid structure.
I found the solution. I used the hint from this post, and it's very straightforward.
What I have to do, is to create another project in the solution, with Output Type set to C# Class Library. Move the reference to SQLite for WinRT, and sqlite-net (nuget) wrapper to this new project. After that, I have to manually go through classes in sqlite-net, and change all the 'internal' classes to 'public'.
For the original controller project, I add using myclasslib; so that class definitions are found.
Apparently this workaround will work flawlessly. SQLite3 is deployed, and there's no warning against missing reference.
I feel embarrassed asking this here, but I was wondering if anyone could help me quickly, the Microsoft documentation around this is actually quite poor.
Microsoft host what appears to be a very neat framework on codeplex that helps you build MVVM WPF applications, and has samples illustrating much of the MVVM principles and the supporting code base they offer. It's called WPF Application Framework and you can download it here.
I downloaded the framework and its samples, as well as the documentation for the sample i'm interested in (WPF EmailClient), but I'm having trouble running the sample.
This is a picture of the documentation:
As you can see, it tells you to simply set the EmailClient.Presentation project as the startup project and run.
However
This project is in fact a Class Library, and cannot be set as a startup project.
I turned it into a Windows Application, but it needs an App.xaml file, and the whole project seems to use MEF as an IoC container and dependency injects all the views and ViewModels dependencies.
All this means a lot of work for me to launch this project, and I was just wondering if any of you out there know how you are supposed to do this.
Oh yea and I'm running windows 8 and VS2012, but I really don't think that has anything to do with it. (The project is targeting .Net 4 anyway)
Interesting framework.
The application for the overarching "InformationManager" sample is a project called "Assembler"
You'll need to set this as the startup project. Make sure you do a full build of the entire solution before you run it, otherwise you'll get an xaml parse exception in app.xaml.
By changing the project type you broke the solution. Download the example again and open the solution in Visual Studio. Next right click on the project you run and select Set as Startup Project.
Then when you press F5 it'll launch that application, not the class library.