473,830 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1490
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********@gma il.comwrote in message
news:11******** *************@n 76g2000hsh.goog legroups.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********@gma il.comwrote in message news:11******** *************@n 76g2000hsh.goog legroups.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********@gma il.comwrote in message news:11******** *************@n 76g2000hsh.goog legroups.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
2554
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 TSQLUnit documentation (not all of it) and i also ran into a newsgroup post saying TSQLUnit is very small compared to NUnit. The conclusion I am making out of this post is that I should rather spend time resarching/reading about NUnit than...
14
2762
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
2579
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 check the result
4
2165
by: Peter Rilling | last post by:
Does VS.NET 2005 Professional support integrated unit testing, or is that only with the team system?
7
1887
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, textbox values. I understand that NUnit is more suitable for OO methods which take set of parameters and return an output parameter. How about tools for testing methods which use state variables and form values?
0
10770
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10481
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10199
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7741
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6948
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5616
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5779
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4409
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3074
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.