Hi,
In an effort to improve my own code and try to teach others that I work with
that unit testing IS MANDATORY. I'm interested in examples of unit testing
that other people are using.
How many folks rely on NUNIT?
Do you create a testing class per application, per class, per assembly to
exercise your code?
Do you know of any links that show examples of how the "Agile process"
incorporates unit testing into its process?
Know of any code in source forge that contains testing code?
How have to standardized your testing classes/code so that it "looks" and
"feels" the same and isn't totally confusing to outsiders that may have to
maintain your code?
Do you embed your test class into the same assembly as the class it tests?
I like this idea because it keeps someone else from breaking your code (at
least making sure it compiles) when they come in to do a "quick" change.
I would appreciate any links or book recommendations on the subject.
Thanks,
Dave 11 2325
D. Yates <fo****@hotmail .com> wrote: In an effort to improve my own code and try to teach others that I work with that unit testing IS MANDATORY. I'm interested in examples of unit testing that other people are using.
How many folks rely on NUNIT?
<raises hand>
Do you create a testing class per application, per class, per assembly to exercise your code?
Per class, usually.
Do you know of any links that show examples of how the "Agile process" incorporates unit testing into its process?
I suspect pretty much any description of Agile coding is likely to
mention unit testing. I don't have any specific links off-hand though.
Know of any code in source forge that contains testing code?
Pretty much any test tool project will have test code. Other examples
are Spring and Hibernate - both Java projects, but I'd expect their
..NET equivalents to have test clode too.
How have to standardized your testing classes/code so that it "looks" and "feels" the same and isn't totally confusing to outsiders that may have to maintain your code?
We tend to use m_subject as a member variable which refers to an
instance of the class under test, for starters.
Do you embed your test class into the same assembly as the class it tests? I like this idea because it keeps someone else from breaking your code (at least making sure it compiles) when they come in to do a "quick" change.
No, we use a different project in the same solution. You don't really
want test code bloating the release DLL - especially if you embed test
data files. On the other hand, if you don't mind a little bit of extra
space and don't mind the possibility of people finding your tests, it's
a great way to allow easy testing of internal members too.
--
Jon Skeet - <sk***@pobox.co m> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
I would agree with Jon, we take a similar approach.
Use NUnit, test per class and keep our test classes seperate from the
main application.
VS2005TS has sample code on the we fly 247 demo CD
Jon,
Thanks for your response.
How do you handle application testing provided that your unit testing
passes? Do you just use human testers or is your testing automated in
anyway?
Dave
Angus,
Thanks for your response.
I noticed that on the test driven site they reference a book called
"Test-Driven Development in .NET". Do you own this book? If so, what are
your thoughts as to its worth. In other words, do you refer to it often or
almost never.....
Thanks,
Dave
"A Miller" <an***@amlsoftw arexx.co.uk> wrote in message
news:ek******** *****@TK2MSFTNG P12.phx.gbl... D. Yates wrote:
I would appreciate any links or book recommendations on the subject.
Here are a couple of links which you might find useful:
http://groups.yahoo.com/group/TestDrivenDevelopment/
http://www.testdriven.com
Angus Miller
"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote:
[...] Do you embed your test class into the same assembly as the class it tests? I like this idea because it keeps someone else from breaking your code (at least making sure it compiles) when they come in to do a "quick" change.
No, we use a different project in the same solution. You don't really want test code bloating the release DLL - especially if you embed test data files. On the other hand, if you don't mind a little bit of extra space and don't mind the possibility of people finding your tests, it's a great way to allow easy testing of internal members too.
Still, you can use conditional compilation to exclude test code from
release builds. I noticed that on the test driven site they reference a book called "Test-Driven Development in .NET". Do you own this book? If so, what are your thoughts as to its worth. In other words, do you refer to it often or almost never.....
That's not a book I know. One I can recommend is 'Working Effectively
with Legacy Code' by Michael Feathers - which gives lots of examples of
how you can implement TDD with your currently untested code. http://www.amazon.com/gp/product/013.../sr=1-1/ref=sr
_1_1/102-3508174-2971300?s=books &v=glance&n=283 155
Angus Miller
D. Yates <fo****@hotmail .com> wrote: Thanks for your response.
How do you handle application testing provided that your unit testing passes? Do you just use human testers or is your testing automated in anyway?
We have some automated tests and some manual tests. Obviously, some
types of UI are easier to test than others - and many integration level
tests can be done at the web service level rather than at the visible
UI level.
--
Jon Skeet - <sk***@pobox.co m> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Hugh Cowan |
last post by:
Hello,
I don't program full-time (anymore), but I do try and stay on-top of
the latest technologies and like most are always trying to upgrade my
skills and remain current (as much as is possible).
Most of my programming these days involves using PHP for creating
script files for automating tasks and procedures (locally), and also
for anything that might be needed by our divisional Intranet (not a
huge site by any stretch of the...
|
by: rhat |
last post by:
Hi Everyone,
I've recently been reading some articles about unit-testing in Python
, but I am a bit confused: where do I go to get started with
this? I tried googling for "unittest" but all I've found are some old
links to projects that already use it, and the older (as the articles
put it) PyUnit project. I'm sorry if this is a obvious question or one
that has already been answered, but unit-testing sounds interesting and
I'm not sure...
|
by: |
last post by:
Hi!
I'm looking for unit-testing tools for .NET.
Somthing like Java has --> http://www.junit.org
regards,
gicio
|
by: Peter Rilling |
last post by:
Does VS.NET 2005 Professional support integrated unit testing, or is that
only with the team system?
|
by: Jacob |
last post by:
I have compiled a set og unit testing
recommendations based on my own experience
on the concept.
Feedback and suggestions for improvements
are appreciated:
http://geosoft.no/development/unittesting.html
Thanks.
| |
by: Dat AU DUONG |
last post by:
Hi,
I am new to Unit testing, could you tell me where I could find information
(hopefully step by step) and what is the benefit of unit testing.
I am a sole developer in a company, therefore I don't get expose to much
of this technology.
Thanks in advance.
Regards Dat.
|
by: shuisheng |
last post by:
Dear All,
I was told that unit test is a powerful tool for progamming. If I am
writing a GUI code, is it possible to still using unit test?
I have a little experience in using unittest++. But I can not work out
a way to use it to test GUI code.
Thanks a lot!
|
by: nw |
last post by:
Hi,
I previously asked for suggestions on teaching testing in C++. Based
on some of the replies I received I decided that best way to proceed
would be to teach the students how they might write their own unit
test framework, and then in a lab session see if I can get them to
write their own. To give them an example I've created the following
UTF class (with a simple test program following). I would welcome and
suggestions on how anybody...
|
by: Ark Khasin |
last post by:
Unit testing is an integral component of both "formal" and "agile"
models of development. Alas, it involves a significant amount of tedious
labor.
There are test automation tools out there but from what limited exposure
I've had, they are pricey, reasonably buggy, and require compiler/target
adaptation.
Out of my frustration with two out of two of them came my own. Its
instrumentation approach is based solely on profound abuse of the C
|
by: Ben Finney |
last post by:
Howdy all,
PEP 299 <URL:http://www.python.org/dev/peps/pep-0299details an
enhancement for entry points to Python programs: a module attribute
(named '__main__') that will be automatically called if the module is
run as a program.
The PEP has status "Rejected", citing backward-compatibility issues,
and Guido's pronouncement that "It's not worth the change (in docs,
user habits, etc.) and there's nothing particularly broken."
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
|
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...
| |