I have a solution with several Silverlight Test Projects. I would like to have some kind of script or tool with the ability of running all these test projects and generating some kind of report (any simple output will work)
I googled around for some time but I was unable to find any existent solution other than running the projects one by one from Visual Studio.
Has someone came across this situation before? Any idea on how to implement such a tool?
Regards
If you need automated testing then Test Manager is a tool from Microsoft. http://www.microsoft.com/visualstudio/en-us/products/2010-editions/test-professional/overview
http://msdn.microsoft.com/en-us/library/bb385901.aspx
and use with silverlight
http://jugalpanchal.blogspot.com/2011/09/configure-test-manager-for-silverlight.html
Use StatLight! http://statlight.codeplex.com It's a Silverlight Test Project runner exe that you can invoke from the cmdline. Its great and can be integrated into TFS Workflows as well as Msbuild.
Related
I have been using Selenium (WebDriver) for some time now, utilising Microsoft Team Foundation Server (VS2010, Microsoft Test Manager, Lab Management) to trigger my automated tests on specified builds. This has been working great and I have even written a wrapper framework to allow for a lot of re-usability and switching to WatiN should it be needed.
My issue is, now the applications I am to test are Windows Forms (with infragistics and Teecharts), not Web Applications, and I am under the impression from my research that both Selenium and WatiN will now be inappropriate. I have been reading about NUnitForms and White as they appear to be common free choices amongst SO posts asking a similar question. However, I am wondering if anyone has had experience with setting up TFS with automated UI tests for a Windows Forms Application?
Or, failing that, has anyone used Visual Studio 2010 with a free Windows Forms UI testing package and had some success? My plan is to try White/NUnitForms next week, but though I would look for some personal recounts just in case this is not worth pursuing.
After some more reading and checking around SO, I have found a few more helpful links. I am still at a loss as to a solid way to do things but am confident it can be done.
The following links I found helpful; winforms Post on SO, Continuous Integration in White Documentation (I missed this initially somehow...), and as a further look I found utilising NUnit with White TFS is fully supported for my needs. NUnit with TFS can be found here.
Hope this helps anyone in the same position, and I welcome any further answers as I still have not commenced any actual testing.
EDIT:
Have decided to use White with NUnit as NUnit has a lot of documentation with results integrated with TFS and White is somewhat of a wrapper to Visual Studio's Automation Tools.
Our team is using Silverlight 5 for development as it has features we require going forward. I have discovered that NUnit doesn't work as standard as it isn't Silverlight and that the tools available for Silverlight testing appear to primarily be aimed at running within browsers and are a pain to automate it seems.
However a lot of the code I want to test is the View Models which aren't specifically Silverlight, so I was hoping there is a way of using NUnit or similar to just test this and integrating into a build server (which is currently being decided upon)
So, is it possible to test Silverlight in this way?
I haven't tried it but looks interesting:
http://statlight.codeplex.com/
and what about third parties (maybe Telerik offers something on their testing suite).
I know it's no ideal, but if it's just VM and non dependant on UI you can link the files to a WPF project and execute the unit tests (in our case we had to share two versions the SL and the WPF one that's why we chose to test our VM in the WPF version :-)).
The unit testing from Silverlight (toolkit) I haven't found a way to link it to an automated build process
The best solution I have found is AgUnit:
http://agunit.codeplex.com/
AgUnit is an open source plugin for ReSharper. This solution of course assumes that you're using ReSharper. AgUnit allows you to run Silverlight unit tests in the ReSharper test running. Unfortunately, I just checked the AgUnit site and it looks like they only support Silverlight 5. You may want to head over there and find out about their plans for supporting Silverlight 5 though as it is a great plugin.
Prior to using AgUnit, we were using Statlight and found it to be pretty good as well, just not quite as convenient as AgUnit.
Does anyone know how to specifically include a winforms setup project to be included in the code_drop folder generated when running UppercuTs zip.bat? With the default settings my web applications and WCF services are included, as are the dll's for the solutions core, but not my winforms application/installer
I was just playing around with UppercuT last night, and I ran into the same question.
One tip I found for putting console apps and windows services into the code_drop is to use this Nuget package in your console/windows service projects:
http://nuget.org/packages/publishedapplications
See this for more info:
http://devlicio.us/blogs/rob_reynolds/archive/2011/03/22/published-applications-aka-publishedapplications.aspx
Using this will cause your console/windows service projects to be "published" similary to how a web app is published in the code_drop. However, this isn't what you're asking for, just wanted to point it out if its useful. This also doesn't work for installers.
If your installers are using the default Visual Studio setup projects (.vdproj projects), I haven't tried that, so I can't help there. I do know that MSBuild refuses to build those types of projects (not sure why...), so you might be better off using WiX or another installer technology. You can do an automated build on a vdproj if you run the build by calling devenv.exe directly from the command line, but you can't build those with MSBuild. I did try adding a WiX setup project to my sln, and UppercuT will build the Wix setup project and drop the .msi in the "build_output" folder, but it doesn't copy it over to the code_drop. My thought would be to add a custom post build step to just copy that file over from build_output to code_drop. I haven't had a chance to figure out the logic in the build scripts to see how it chooses which files to copy from build_output to code_drop. If I figure anything out, I'll update this answer.
I know that this is a very stupid question, but I have not been able to find a definitive Guide to creating a basic Installer for my windows forms application. I know we have to use Setup and Deployment Projects in VS2010 but have not been able to find any step by step guide for it.
If possible please guide me regarding the same.
Thanks
Many Winforms projects don't require an installer. Just copy the files in the Release folder, formally named "XCopy deployment". The walkthrough for a Setup and Deployment project is here.
I'm currently learning how to do setup projects as well.. I found a couple of sites that helped me to get off the ground and have a basic installer. I know the first link is from way back in 2005, but it still helped.
http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/
http://www.eggheadcafe.com/tutorials/aspnet/dcc5ab62-b875-4852-9e34-8bc2794e4fb8/c--create-setup-project.aspx
I've been asked to investigate the possibility of using a single .csproj file to run both interactive and unit tests. I've been able to get the windows forms project changed over to run msTests but now I'm not finding a way to run the windows forms/interactive side. Is there a way to do this?
There are only 2 methods I've found for what my team was looking for. nUnit instead of MsTests, or manually executing the /debug built win-forms executable and then attaching the debugger to it. So nice clean integration using MsTests/VS2010 is out the window.