Solved

Silverlight, Unit Testing and GUI testing

Posted on 2011-02-20
3
519 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
New to SOAP and need some direction 10 40
Need a complete list of ASP.NET page load events 3 25
C# HTTP GET method sample code 3 39
C# parent child form 5 14
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

914 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

12 Experts available now in Live!

Get 1:1 Help Now