Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Unit Testing ASP.NET 1.1 w/NUnit

Reply
Thread Tools

Unit Testing ASP.NET 1.1 w/NUnit

 
 
Mike Hofer
Guest
Posts: n/a
 
      03-30-2007
I need some advice, folks, and I'm hoping you can provide it.

First off, a few disclaimers:

1.) I am an ardant advocate of code quality. Especially, my own.

2.) I am maintaining a massive ASP.NET 1.1 code base that has no unit
tests built for it with NUnit or any other testing framework.

3.) Moving to .NET 2.0 and VSTS is not an option.

I am familiar with NUnit, and TDD in general. However, the base NUnit
library (last time I looked) doesn't natively support testing of
ASP.NET pages. In particular, if I want to test session state
management, viewstate management, and so forth, I'm out of luck unless
I first do a whole lot of refactoring (destabilizing the code).

While I'm all for cleaning up the code, I'm also for getting the
product out the door on time. I only refactor when it's necessary.
Anyway, I digress.

So my point is this: Is there an add-on for NUnit that tests ASP.NET
pages (specifically, targeting .NET Framework 1.1) that you recommend,
and if so, why?

I found NUnitAsp, and it looks promising, but I'd rather not
experiment on a working codebase. (I'll test it on some sample code
first.) You can find the link to NUnitAsp here:

http://nunitasp.sourceforge.net/

Any pointers you can provide will be greatly appreciated.

Thanks in advance!

Mike Hofer

 
Reply With Quote
 
 
 
 
Jon Paal [MSMD]
Guest
Posts: n/a
 
      03-30-2007
here's another option...

http://www.superexpert.com/Blog/Archive/4.aspx


 
Reply With Quote
 
 
 
 
Mike Hofer
Guest
Posts: n/a
 
      03-30-2007
On Mar 30, 1:37 pm, "Jon Paal [MSMD]" <Jon[ nospam ]Paal @ everywhere
dot com> wrote:
> here's another option...
>
> http://www.superexpert.com/Blog/Archive/4.aspx


The Selenium IDE looks like it requires your pages to be designed
BEFORE you script the tests. Isn't that the inverse of TDD? (Test
before you code?)

 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      03-30-2007
Yes, but I am not always a purist.

The nUnitASP project is fine for testing your ASP.NET apps. I would
recommend getting used to it prior to hooking it up to your application, but
it works nicely.

Overall, I suggest moving all non-UI code to libraries. You can then attach
unit tests to all of that code. The only thing left for nUnitAsp (or
similar) to test is UI code, which is normally not where your big problems
lie. While this is a good practice, it goes counter to most of the examples
on the web and in books (which heavily embed code into the pages, mostly
code behind, but some actually mix code in the tagged pages - YUCK!).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
"Mike Hofer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> On Mar 30, 1:37 pm, "Jon Paal [MSMD]" <Jon[ nospam ]Paal @ everywhere
> dot com> wrote:
>> here's another option...
>>
>> http://www.superexpert.com/Blog/Archive/4.aspx

>
> The Selenium IDE looks like it requires your pages to be designed
> BEFORE you script the tests. Isn't that the inverse of TDD? (Test
> before you code?)
>


 
Reply With Quote
 
Jon Paal [MSMD]
Guest
Posts: n/a
 
      03-30-2007
As indicated, it's an option.

'Before' or 'after' test development for websites is sort of a chicken and egg thing. It's hard to define/build tests if you
haven't defined what is going to be tested....







"Mike Hofer" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) ups.com...
> On Mar 30, 1:37 pm, "Jon Paal [MSMD]" <Jon[ nospam ]Paal @ everywhere
> dot com> wrote:
>> here's another option...
>>
>> http://www.superexpert.com/Blog/Archive/4.aspx

>
> The Selenium IDE looks like it requires your pages to be designed
> BEFORE you script the tests. Isn't that the inverse of TDD? (Test
> before you code?)
>



 
Reply With Quote
 
Jon Paal [MSMD]
Guest
Posts: n/a
 
      03-30-2007
one more view point....

http://www.coveryourasp.net/Technical/ASPNETTDD



"Mike Hofer" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) ups.com...
> On Mar 30, 1:37 pm, "Jon Paal [MSMD]" <Jon[ nospam ]Paal @ everywhere
> dot com> wrote:
>> here's another option...
>>
>> http://www.superexpert.com/Blog/Archive/4.aspx

>
> The Selenium IDE looks like it requires your pages to be designed
> BEFORE you script the tests. Isn't that the inverse of TDD? (Test
> before you code?)
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Webinar - Testing the Untestable - Unit Testing Dependencies andLegacy Code (in C++) Avi C Programming 0 06-11-2012 01:55 PM
[ANN] Webinar - Testing the Untestable - Unit Testing Dependenciesand Legacy Code in C++ Avi C++ 0 06-06-2012 11:25 AM
unit-profiling, similar to unit-testing Ulrich Eckhardt Python 6 11-18-2011 02:00 AM
Unit testing errors (testing the platform module) John Maclean Python 1 04-13-2010 02:11 PM
Test::Unit - Ruby Unit Testing Framework Questions Bill Mosteller Ruby 0 10-22-2009 02:02 PM



Advertisments