Unit test cases

Posted on 2015-02-08
Medium Priority
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.

Question by:Dinesh Kumar
  • 3
  • 2
LVL 37

Accepted Solution

ste5an earned 1000 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.

Author Comment

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

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.
7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

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

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.
LVL 96

Assisted Solution

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

Customizing Code Coverage Analysis

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Use this step by step method when setting up QuickBooks Online. They will allow you to explore the various features of the advanced settings available to you.
This blog will spread awareness about Dropbox. We have given the statements based upon our experience. Along with this, there is a section of some new plans that should be added in Dropbox this year. This will make the storage service enhanced from …
This Micro Tutorial will explain how to export DynamoDB tables in Amazon Web Services.
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…

597 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