Switching from Web UI testing to Windows Forms application testing - winforms

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.

Related

Automated Silverlight 5 Unit testing for business logic

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.

Script-Run Silverlight Test Project

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.

Report viewer control for VB.Net1.1

Good morning fellow stack overflow people, I have a question that sounds like the start of something from the daily wtf.
The company that I work for is not so much sacred of new technology they just seem to let things slip, you know the type, “It worked 5/6+ years ago so I don’t see why we should change it”
Despite this I have managed by hook or by crook to get an installation of SQL server 2008R2 to develop on which has the reporting services. Excellent I think, I can finally start moving some of the access applications to VB.net and use SSRS to provide some embedded reports, everyone is happy.
But not so fast, it turns out the standard build of desktop here only has .net1.1. I have managed to dust off a copy of visual studio 2003 (The last edition that could target 1.1) and built a few little tests to check DB connectivity. The problem I am having is the report viewer control is only available in .net2.0 and above.
So what options do I have for displaying my SSRS reports in a VB.net1.1 thick client application?
Before anyone asks the following options are out
Going anything web based (Farrrrrrrrrr too modern for the company + no web server)
Upgrading to a version of .net released after George Bush the 2nd lost an election but still became president
Changing jobs
Sorry for the long question but I thought some background would help
I would go for a browser control but I think they only started including that in 2.0. But I think you can still do something like that in 1.1 (it has been to long to be sure).
I think if you install SSRS on the sqlserver you could turn on IIS on that server and then use that to make your reports and show them in the browser control.
SSRS (I'm pretty sure it came out somewhere around 2005) is not old enough to have many other options.
If you work with VB.NET 1.1 all the time then it is strange question. How did you program in it before?
Use any available dataview control (I already do not remember - DataGrid, DataList, Repeater) from .NET1.1. There is nothing in ReportViewer that could not be done before its appearance, in .NET1.1.
What is the problem?
Update:
I remember seeing code projects reproducing ReportViewer in .NET1.1 few years ago though I cannot find it now. Anyway, it seems to me the problem of just reading .NET1.1 docs and searching internet.
Sorry if this is a blunt statement but sometimes, you've got to bite the bullet and do the right thin.
If you really want to use reports and you've found the minimum version of the .NET framework is 2.0 then go ahead, find an internet connection somewhere and upgrade the computers.
If you can't do that, forget about it and go back to your VB6 or whatever you're using. Besides, .NET Framework 2.0 sp1 is less than 30MB. If you can't find a decent internet connection (either at your workplace or somewhere else) to download it then you might as well abandon it.
And I'll add as well. VS2003 IS OLD! Get yourself minimum VS2005, even if it's Express edition, it's good enough and stop whining.
Someone had the same question back in Feb. Maybe this might send you down the right path:
Using SSRS in ASP.NET 1.1

Switching to WPF. Is it time?

I'm considering switching from MFC to WPF.
My first concern is that there are too many users who don't have .NET with WPF installed yet. Can anybody point to a source containing the WPF penetration numbers?
My second concern is speed.
Any other considerations?
I've been banging away at WPF for a while now. It is brilliant, but it still has (occasional) holes you've to plug yourself. However all indications are .NET 4.0 will be a significant step forward.
I would say start now. The WPF learning curve is REALLY steep, and it'll be a while before you'll be releasing software to users, believe me. Also do yourself a favour and get the WPF Unleashed book. It's superior.
Speed isn't a consideration. The power WPF gives is well worth any drawbacks with speed, which - coming from Windows Forms - I haven't noticed to be honest.
What kind of application are you developing? If it's a wide-distribution desktop app that you want your grandmother to install, your concern about .NET 3.0/3.5 adoption is valid. So far from what I've seen, performance is less of a concern.
WPF penetration
First of all, Windows Vista and Windows 7 both have WPF preinstalled, which accounts for 35% of the market automatically. Windows XP has had it as it had .NET Framework 3.0 as an option in Windows Update for over three years, and many applications ship with it, so it is likely to also be installed on a high percentage of Windows XP machines. StatOwl indicates that about 80% of NET Framework installations are version 3 or above.
If you're shipping on CD it is no big deal to include the latest .NET Framework on the CD and have it install automatically. If users are downloading your application, it can contact Microsoft's web server to download and install the latest .NET Framework. Online ClickOnce deployment also has this capability if you want people to be able to start their application directly from the web browser without installing it.
So the bottom line is, you probably don't need to worry about whether people will have WPF installed on their machines or not unless your target market consists primarily of dial up customers on Windows XP who don't run much third-party software (i.e., they just run Windows and your application).
Speed
Not an issue. I have a 200 MHz Pentium Pro with 384 MB RAM from 1998 that I test my software on, and my WPF applications have comparable performance with equivalent MFC applications. If your WPF application uses lots of fancy graphics and animation it will run slowly on ancient CPUs and graphics cards, but so would an ordinary MFC application with the same features.
Don't even bother trying to use WPF if you are sticking with Visual Studio 2008 for the next year or two. The experience will be way too painful. I'm talking about "my IDE crashed again" type of pain.
If you are going to use VS 2010 in the near future, then WPF is a blast. Download the beta, a couple of themes off CodePlex, are start playing. Once you get past the (freaking huge) learning curve I think you will find it to be quite enjoyable.
IMHO, you should wait for Visual Studio 2010 and WPF 4.0 to make the actual migration. They will close some very annoying gaps in the product.
Meanwhile, you can try it out. In terms of coding/readability -- it's going to be WAAAY better than with MFC =)
As for the performance and platform -- it shouldn't be a problem unless you have any very special circumstances (like if you can't require users to install .NET).
Also see this related question on switching to WPF from Windows Forms.
If you are thinking about a larger, modular, appliation I recommend checking out Prism. It's a bit of a beast itself, but you should be able to tackle it after coming to grips with C#, Dependency Properties and XAML. Plus, learning Prism gave me a much better understanding of WPF/Silverlight, at least from the development/binding side.
Mike Taulty posted an excellent 10 part video series on Prism. It's a great way to get your head around the platform.
I'd also recommend the pages linked to from the Getting Started page on codeplex. After all that, you're probably ready to tackle the Reference Implementation which comes with the download.
A previous answer of mine might also help clear up any remaining confusion around Controllers/Presenters in the framework that you might have (I did).

Silverlight - where do you start (for free)?

First I've read loads of posts and sites that recommend going to http://silverlight.net/GetStarted/ to get started but I do not have visual studio and I'm not going to purchase it just to 'maybe' learn some silverlight that I'm not going to be able to use for a little while.
The reason being that I've already installed visual studio and all the other things required during a quiet period of work, then another project came up and by the time I got back to thinking about silverlight the trial period has finished.
I have not done C# or XAML (mainly Java, AS3 & MXML, hence the lack of MS tools) but I'd like to look into silverlight when I'm quiet to create some test projects and to determine where I can use it if anywhere. Is there a toolset that will let me learn and use all that is required without purchasing the software (perhaps it would have a watermark like the flex datacharts used to have, unless you purchased them, maybe an eclipse plugin - although I imagine I'm being a bit optimistic here).
If there isn't such a thing then perhaps MS should look into this, Adobe recently let anyone unemployed/students etc to get flexbuilder for free to increase its uptake. That would be great is MS did something similar.
If you are a student, you can get professional Microsoft tools for free through the Dreamspark program. http://www.dreamspark.com
You can download Blend preview 3 and visual studio 2010 for free and use it. You have the tools and knowledge now ;-)
Check out Bizspark too.
Allegedly, you can now use one of Microsoft's free "Express" development systems to develop Silverlight apps.
http://www.bluerosegames.com/SilverlightBrassTacks/post/You-can-now-write-Silverlight-apps-in-Visual-Web-Developer-Express.aspx
In addition to the free-as-in-free-beer options from MS that other answers mention: if you only want to play around with Silverlight for now, consider trying Moonlight -- it may not yet be ready for production work, but nevertheless usable for learning purposes.
One place you can go is to the express web site on Microsoft.com. You can get free, albeit trimmed back, versions of the current release of Visual Studio and SQL Server there.
You can also get a trial version of Expression Blend 2. Blend is a design oriented tool for creating Silverlight applications.
You can also usually find betas of upcoming releases without much trouble.
Silverlight + Eclipse:
http://www.eclipse4sl.org/download/
And how to workaround Express for SL
http://www.informikon.com/blog/howto-silverlight-and-visual-studio-express.html
Good luck
Braulio

Resources