Solved

Silverlight, Unit Testing and GUI testing

Posted on 2011-02-20
3
523 Views
Last Modified: 2012-08-13
I have written MVC2 and MVC3 applications and used Unit Testing within Visual Studio 2008 and 2010.  If I want to use Unit Testing with a Silverlight app. and its associated Out of Browser app., must it be built with the MVC design pattern? If I do not use MVC, I presume the code that gets unit tested would be the Data Acces Layer, for example. Please explain this.

Also, how would I use Unit Testing to test the GUI work?
0
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
anarki_jimbel earned 500 total points
ID: 34939245
OK, you may find tens of opinions on unit testing. Probably :)

For me  - unit testing does not really depend on MVC or other technology or paradigm. According to Wikipedia, "... unit testing is a method by which individual units of source code are tested to determine if they are fit for use. A unit is the smallest testable part of an application." Usually a unit is a method. People may argue if we test private methods but still this does not change anything. We just write some code to test a validity of a method. One test normally represent just one scenario (one variation of passed args etc).

In normal unit testing it's required to avoid using a real database. Or any database at all (use mocking for DB results).

Testing databases and an access layer - a bit different. Not exactly unit testing for me. Anyway, try the link:

http://www.codeproject.com/KB/database/UnitTestDbAppsWithNDbUnit.aspx
0
 
LVL 30

Assisted Solution

by:anarki_jimbel
anarki_jimbel earned 500 total points
ID: 34939890
Oh, forgot about UI testing.

Not much I can say. But UI testing is very different from unit testing. And normally people do not unit test UI classes. They use something else.

For UI testing in our company we have an in-house system, and I don't really know much about other systems. However, a new frameworkwas introduced: NUnitForms. See

http://nunitforms.sourceforge.net/
0
 

Author Closing Comment

by:newbieweb
ID: 34946018
Thanks!
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question