Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 582
  • Last Modified:

Test Driven Development (Unit Test)

Looking for Test Driven Development TDD (Unit Test) experts in vb.net! I am having  issues developing web app in TDD. Please reply if you have experience in TDD and i will post my questions here.


Thanks
Kerau
0
Kerau
Asked:
Kerau
  • 7
  • 4
  • 2
2 Solutions
 
b_levittCommented:
I generally only unit test my business teir classes.  I use nunit or the built in unit testing in visual stuidio.  If you're looking to test your ui teir, you may need to consider asp.net MVC.

http://www.asp.net/mvc/
0
 
KerauAuthor Commented:
Thanks b_levitt, I am using tdd (nunit) to the whole web app from UI to Datamappers. Whenever a modification or a feature change needs to be added i start by writing the test first and since the test will/should not pass the first time then i have make changes to make it pass. Then i can add views which is the UI of the app. Just to give you an overview of my web app ..its something like (look image). Please suggest
err.JPG
0
 
topdog770Commented:
As b_levitt said above, I create tests for all of my business level code, and then have the UI elements call into the business code.
In your example, you should be able to create tests that validate results based on input.  If the results are correct then your UI should be correct.   NUnit isn't really configured, as far as I know, to handle UI testing.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
b_levittCommented:
It is true that testing the actual UI isn't very practical.  However with MVC the 'View' doesn't really do anything anyway.  And unlike traditional webforms (code behind) you can at least test the the model.

Your project appears to have the MVC pattern (although you didn't say that you were using the actual MVC ASP.Net framework so I'll assume what you have is custom).  If it is at least close to ASP.Net MVC, then start here:

http://blogs.msdn.com/webdevtools/archive/2008/03/06/asp-net-mvc-test-framework-integration-demo.aspx

On that page they have a demo on testing MVC with nunit.
0
 
KerauAuthor Commented:
thanks topdog770 and b_levitt...wow you both are absolutely right. I am hopeful now...The project is in MVC and its custom designed...Please help with the issues i am facing and unable to address. ...I will come up with a question tomorrow morning if thats okay with you...

thanks
kerau
0
 
KerauAuthor Commented:
Thanks
0
 
topdog770Commented:
I'll keep an eye out for it
 
0
 
KerauAuthor Commented:
Please help me with this one. I will give you a brief background of my project..there are two different app which i have to work on to make a feature change..The first app (app A) has all the ui and design page, since it contains different applications where as the second app (App B, this is the app i have been assigned to) has most of the code behind and this is designed using test driven development methodology MVC Model. Every time i make changes to the app B and execute it; it will generate a dll which i would paste in the first app's external assembly to check that my changes are working in UI..


Now the first issue i am trying to deal is to add more columns to the UI of my displayed grid. I have a search page in App A, it has 5 different search types(One of them is person). Once the user chooses one of these search types(lets assume person). Based on the search calculation it will display six different columns on a gridview(more information about that person). Now i have to add more columns to the grid. The good part, For that what i know is: i have to make changes to App B to get those values in App B and ONROWDATABIND of App A i will have to bind those values to the gridview control. The bad part:
i don't really know where should i write the tests related to it.


I went to get a second opinon from my senior colleague and he told me that i have to calculate the values on the runtime. As those values are already there huh..since i have just graduated and put into such a situation where the tasks are overohelming and with this retrogression i just don't want to loose my job by displeasing my leads. Hence i need your help to figure this issue out. If interested please reply back and i can post you the code behind.

Thanks
Kerau
0
 
topdog770Commented:
Id be happy to help, but you'll need to create a new question in keeping with experts-exchange policy
 
0
 
topdog770Commented:
u can even add a new link to new question from here.. to make it easier to follow!
 
0
 
KerauAuthor Commented:
Sure thing, let me create a new question for you then..will be back =]
0
 
KerauAuthor Commented:
0
 
KerauAuthor Commented:
another issue with test driven development, if interested please have a look at it. Waiting for your response ...

http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_24317336.html
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 7
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now