Solved

Silverlight, Unit Testing and GUI testing

Posted on 2011-02-20
3
518 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
  • 2
3 Comments
 
LVL 29

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 29

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now