Solved

Unit test cases

Posted on 2015-02-08
7
71 Views
Last Modified: 2015-03-18
Hi Experts,

I see the Web Application on which I am working is merged with both business logic and UI controls in Code behind files. Now I need to write Unit test cases for my application. I just want to confirm can I write test cases for UI controls like Gridview, Dropdownlist population. If not what can be the reason.

Thanks,
meetDinesh
0
Comment
Question by:Dinesh Kumar
  • 3
  • 2
7 Comments
 
LVL 33

Accepted Solution

by:
ste5an earned 250 total points
ID: 40597872
Yes, you can. But it depends on the code and the used test framework:

VS general UI testing: Verifying Code by Using UI Automation
And Web test require Selenium: Selenium automates browsers.

The problem with tightly coupled code is, that you will have problems in getting a good code coverage.
0
 

Author Comment

by:Dinesh Kumar
ID: 40598014
I am using visual studio Test Explorer existing in Visual studio ultimate edition.
0
 

Author Comment

by:Dinesh Kumar
ID: 40624413
Hi ste5an, thanks for the response, I have come across of testing javascript using QUnit framework and HTML using seleno i.e selenium but my concern is that while calculating code coverage using MSTest, will the test cases written using QUnit and seleno will be counted or MStest will just ignore these test cases :( because mine's ultimate goal is to improve the code coverage in a legacy application.
0
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 
LVL 96

Expert Comment

by:Bob Learned
ID: 40628337
Since you have Visual Studio Ultimate Edition, you should have access to Coded UI tests.

Test Automation Using Visual Studio 2010 Coded UI
https://msdn.microsoft.com/en-us/magazine/hh875174.aspx
0
 

Author Comment

by:Dinesh Kumar
ID: 40631221
Well!   will it help in code coverage using MSTest.. if you can see my last comment in more detail that would help me.
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 250 total points
ID: 40631357
You can configure the tests to use code coverage.

Customizing Code Coverage Analysis
https://msdn.microsoft.com/en-us/library/jj159530.aspx
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

895 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

17 Experts available now in Live!

Get 1:1 Help Now