By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,830 Members | 1,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,830 IT Pros & Developers. It's quick & easy.

Unit testing tools?

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.