473,382 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Unit Testing ASP.NET 1.1 w/NUnit

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

Mar 30 '07 #1
5 1474
On Mar 30, 1:37 pm, "Jon Paal [MSMD]" <Jon[ nospam ]Paal @ everywhere
dot comwrote:
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?)

Mar 30 '07 #3
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" <kc********@gmail.comwrote in message
news:11*********************@n76g2000hsh.googlegro ups.com...
On Mar 30, 1:37 pm, "Jon Paal [MSMD]" <Jon[ nospam ]Paal @ everywhere
dot comwrote:
>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?)
Mar 30 '07 #4
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" <kc********@gmail.comwrote in message news:11*********************@n76g2000hsh.googlegro ups.com...
On Mar 30, 1:37 pm, "Jon Paal [MSMD]" <Jon[ nospam ]Paal @ everywhere
dot comwrote:
>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?)

Mar 30 '07 #5
one more view point....

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

"Mike Hofer" <kc********@gmail.comwrote in message news:11*********************@n76g2000hsh.googlegro ups.com...
On Mar 30, 1:37 pm, "Jon Paal [MSMD]" <Jon[ nospam ]Paal @ everywhere
dot comwrote:
>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?)

Mar 30 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: serge | last post by:
I've started researching on Unit Testing and I must admit I had never heard of Unit Testing until a couple of months ago. Obviously I am interested in Unit Testing Stored Procedures. I read the...
14
by: | last post by:
Hi! I'm looking for unit-testing tools for .NET. Somthing like Java has --> http://www.junit.org regards, gicio
16
by: Greg Roberts | last post by:
Hi I want to place the tests needed in the code using attributes. There seems to be enough code snippets around for me to cover this. e.g. // Test cases, run these here on the function and...
4
by: Peter Rilling | last post by:
Does VS.NET 2005 Professional support integrated unit testing, or is that only with the team system?
7
by: Diffident | last post by:
Hello All, Can anyone please suggest me a good unit testing tool. I have seen NUnit but not sure on how I can use it to test my methods which involve session variables, viewstate variables,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.