473,398 Members | 2,404 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,398 software developers and data experts.

Unit testing tools?

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?

Thank you!!
Mar 28 '06 #1
7 1858
this is where interface design is important. if you write test first code,
then you want a wrapper around session and state that supplies a factory.
when running unit tests, normally you supply "mock" objects for any object
referenced by the object under test.

-- bruce (sqlwork.com)


"Diffident" <Di*******@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
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?

Thank you!!

Mar 28 '06 #2
"methods which involve session
variables, viewstate variables, textbox "

If you have business rule methods or even UI methods
that access these directly, then you've made a design mistake.

Usage of these should be restricted to events
in your page. These types of values should
be passed in a parameters to your methods.
--
Robbe Morris - 2004-2006 Microsoft MVP C#
Earn money answering .NET questions
http://www.eggheadcafe.com/forums/merit.asp

"Diffident" <Di*******@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
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?

Thank you!!

Mar 29 '06 #3
I'm in agreeement with the other posters here. You're almost blurring
the distinction between unit testing and system testing

Having said that, there is an ASP flavour of nunit called nunitasp.
See http://nunitasp.sourceforge.net for more info

Mar 29 '06 #4
with try catch statements you can see your results or
-- you could just trap the desired information in a output value or
-- javascript alert and then you can see what is happening.

I find this to be much easier than doubling my workload to build nunit tests and tests to test my tests :)
"Diffident" <Di*******@discussions.microsoft.com> wrote in message news:09**********************************@microsof t.com...
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?

Thank you!!

Mar 29 '06 #5
I would urge you to rethink that. For run of the mill
basic form driven applications, you can often times
scale down your unit testing.

But, as soon you start working on complex
applications with extremely complex business rules,
unit testing is a must. Being able to rerun your
unit tests in mass during development and prior
to builds is an invaluable way to reduce errors
visible to your ui development team and
your quality assurance testers. If implemented
properly, it can be a time saver over not
unit testing at all.

--
Robbe Morris - 2004-2006 Microsoft MVP C#
Earn money answering .NET questions
http://www.eggheadcafe.com/forums/merit.asp

"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
with try catch statements you can see your results or
-- you could just trap the desired information in a output value or
-- javascript alert and then you can see what is happening.

I find this to be much easier than doubling my workload to build nunit
tests and tests to test my tests :)
"Diffident" <Di*******@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
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?

Thank you!!


Mar 30 '06 #6
A few years ago I discovered the whole eXtreme Programming approach to
software development. I had to be dragged into the mindset of Test
Driven Developement (via nunit) but it totally transformed my outlook
on software development.

I think it made it more fun, forcing me to think about class design
before coding and giving me great confidence in changing other people's
code.

I'm pretty much "test infected" these days; I never want to go back to
the bad old days of purely hacking code together. This is much more
"grown-up". I implement it as much as possible in my own home
projects.

Of course there's always a time when you need to be pragmatic to "just
get the job done", but these things have a habit of coming back and
biting you ;-)

Mar 30 '06 #7
There is no "team" in my world. I'm the team.

Until there is a built-in library of pre-programmed (?) tests that can be activated, I could never stop and build all the addtional
code for testing development. My clients won't pay for that extra time, and so far I'm able to produce solid deliverables without
it.

"Robbe Morris [C# MVP]" <in**@eggheadcafe.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
I would urge you to rethink that. For run of the mill
basic form driven applications, you can often times
scale down your unit testing.

But, as soon you start working on complex
applications with extremely complex business rules,
unit testing is a must. Being able to rerun your
unit tests in mass during development and prior
to builds is an invaluable way to reduce errors
visible to your ui development team and
your quality assurance testers. If implemented
properly, it can be a time saver over not
unit testing at all.

--
Robbe Morris - 2004-2006 Microsoft MVP C#
Earn money answering .NET questions
http://www.eggheadcafe.com/forums/merit.asp

"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl...
with try catch statements you can see your results or
-- you could just trap the desired information in a output value or
-- javascript alert and then you can see what is happening.

I find this to be much easier than doubling my workload to build nunit tests and tests to test my tests :)
"Diffident" <Di*******@discussions.microsoft.com> wrote in message news:09**********************************@microsof t.com...
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?

Thank you!!



Mar 30 '06 #8

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

Similar topics

0
by: kferrara | last post by:
I am looking for a unit testing tool to use with VB.net and ASP.net. Nunit is good with VB.net however I haven't tried nUnitASP. Has anybody used any other unit testing tools? Any suggestions...
1
by: Doug | last post by:
Hello, I was wondering if someone had an idea of good unit testing tools out there. I have looked at NUnit and HarnessIt and they both have good and bad sides to them, but mainly we are looking...
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
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.