Cory Foy | 1 May 03:27 2005

Thanks!

I just wanted to thank everyone for their great feedback. The 
presentation was quite a success - I got a lot of great comments from 
people who had never seen NUnit, Unit Testing, TDD, NUnitAsp (which was 
most everyone).

For those who only saw the first presentation, there were a lot of 
changes made to it based on various feedback. For example, I had 
accidently left out a whole section on using NUnitAsp to test code 
behind! The final presentation is available from 
http://www.cornetdesign.com though I won't have the code examples up 
until Monday.

While we may not have everyone test-infected yet, by showing how easy it 
was to make changes and be sure of what you are doing by having unit 
tests it appeared a lot of people are going to start taking a closer 
look at it.

One interesting caveat - just before the presentation started I had 
several people confused thinking that "Test Driving ASP.NET Development" 
meant that this was targetted at QA teams. Also, someone mentioned that 
VS 2005 has a QA project which had parts that sound a lot like NUnit and 
NUnitAsp. With the presentation out of the way I'll install it next week 
and see how it goes.

Again, thank you everyone - I owe all of you a debt of gratitude and a 
${tasty_beverage}.

Cory

 
(Continue reading)

Phlip | 1 May 20:04 2005
Picon

CppUnit usability

Newsgroupies:

The good news is the latest version of wxWidgets has a suite of unit tests.

The other good news is they only test the low-level stuff, not the
Widgets, giving me an opportunity for converting their leaders to
TFUI.

And the other good news is they use CppUnit. This raises some
usability issues, which I must hack around. The question is this:
Which of these hacks have a built-in CppUnit solution that I could
have enabled?

The first hack is to get the TestCollector pattern by stuffing
everything required to declare one test case and its fixture into a
single macro:

  //  bottle up all the boilerplate stuff...
#define TEST_(base, Foo) \
    class Foo##base : public base  {       \
    public:    Foo##base() {}               \
    private:                                 \
        CPPUNIT_TEST_SUITE( Foo##base );      \
            CPPUNIT_TEST( Case );              \
        CPPUNIT_TEST_SUITE_END();               \
        void Case();                             \
        DECLARE_NO_COPY_CLASS(Foo##base) };       \
    CPPUNIT_TEST_SUITE_REGISTRATION( Foo##base );  \
        void Foo##base::Case()

(Continue reading)

banshee858 | 2 May 17:58 2005
Picon

Mulitthreading & TDD

Last week, I was asked by my team to look into multithreading for a
Dot.Net application we are writing.  We have a fair number of
asynchronous processes in the application and want to handle them
using threading.  At least I think this is the way to solve this
problem, maybe there are other alternatives that we can talk about
off-line.  

I feel like I have a basic understanding the mechanics, but I have no
real ideas on how to test for it.  Has anyone used TDD with
multithreading?  What types of tests do you write?  What types of
problems should I avoid?  Is NUnit even capable of doing this or do
you need to use a tool like fit\fitnesse to test this behavior?  Thank
you in advance for your help.

Carlton

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/testdrivendevelopment/

<*> To unsubscribe from this group, send an email to:
    testdrivendevelopment-unsubscribe <at> yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

James Grenning | 3 May 07:41 2005

RE: Mulitthreading & TDD

Try to keep threading logic separate from the business logic.  This is done
by decorating or wrapping business logic with the threading logic.  If you
mix up business logic and threading logic the testing job will be harder.

For example, a string needs to be checked against a dictionary in parallel
with other activities.  Get the Dictionary lookup to work in a single
thread, then wrap that object in an ActiveDictionary that causes the
Dictionary method to be called in a separate thread.  The ActiveDictionary's
only job is dealing with delegating to the separate thread.  You basically
need to figure out the mutual exclusion mechanisms needed and hand shaking
between threads.  

If you end up doing a few of these you might end up with some form of
ActiveObject class, that can be reused among your threading applications. 

If you want to see some examples of multithreaded tests in C++ take a look
at the Concurrency package in CppTestTools.  It is not a complete
implementation, more of a work in progress.
http://www.fitnesse.org/FitServers.CppFit

------------------------
James W Grenning            
Object Mentor, Inc.       
Gurnee, IL 60031   
www.objectmentor.com
blog.objectmentor.com
(847)438-9942
------------------------

> -----Original Message-----
(Continue reading)

Logan, Patrick D | 3 May 18:43 2005
Picon

RE: Mulitthreading & TDD

"Try to keep threading logic separate from the business logic.  This is
done
by decorating or wrapping business logic with the threading logic.  If
you
mix up business logic and threading logic the testing job will be
harder."

I would agree this is a key.

"If you end up doing a few of these you might end up with some form of
ActiveObject class, that can be reused among your threading
applications."

Another approach is to use some specific coordination mechanisms such as
a shared queue, streams, or a tuple space based on the nature of the
coordination. That may be less work than creating and testing some
number of ActiveObject subclasses.

Each of these ideas will get you to avoid low-level locks, monitors, and
arbitrary shared variables.

-Patrick

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/testdrivendevelopment/

<*> To unsubscribe from this group, send an email to:
(Continue reading)

Charlie Poole | 4 May 06:11 2005

RE: Mulitthreading & TDD

Hi Carlton,

First be sure to unit-test all the pieces - without worrying about
threading.

If you are refering to actual OS processes, then I think you are
definitely in
the domain of application integration testing, not unit testing.

OTOH, if you simply mean individual threads doing a particular job, I
think
it depends on how well you can isolate the thread coordination. For
example,
if you had a queue that is fed from several threads and unloaded by a
single
reader, I think you'd want to
 1. Make sure the queue actually works using standard unit-tests
 2. Make sure that the results are what you would expect when two or
      more writers try to get to the queue.
 3. Make sure that writers and readers don't interfere.
You can do that by establishing appropriate locking and setting up
situations
that would cause a conflict if the locking did not work. 

If you have several places where this sort of coordination is needed,
then you
should encapsulate it in your own class - or use a builtin one if
appropriate.
In that case, set up a dummy class that allows you to test the required 
locking scenarios in the abstract and leave only a few tests in place
(Continue reading)

Sayooj Thandasherry | 1 May 06:49 2005
Picon

Re: new to TDD

Thank you very much for responding , will start the work very soon.

Phlip <phlip2005 <at> gmail.com> wrote:Sayooj Thandasherry wrote:

> Till now i havent implemented TDD in any of the project i am working but look to implement it soon.
> Please give the valuable resources which is suitable to start TDD from begining.

Sounds like you are not at the beginning - you have existing code with no tests.

Read /Working Effectively with Legacy Code/ by Mike Feathers. Then add
a test rig to your project, and run it every few edits whether it does
anything or not. Get in the habit, and make sure everyone in your team
knows this habit and follows it. Then start following the Legacy
techniques, to introduce tests and to decouple the code for testing.

--

-- 
Phlip

---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/testdrivendevelopment/

   To unsubscribe from this group, send an email to:
testdrivendevelopment-unsubscribe <at> yahoogroups.com

   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 

__________________________________________________
(Continue reading)

Glenn Halstead | 6 May 00:24 2005

Visual Studio .net - C++ - Unit Test

I've been doing some TDD with C# - and Ron Jefferies book - Extreme 
Programming Adventures in C#.

I'll soon be doing some C++ development  - extending some existing code 
which has with no unit tests.

What unit test framework would folks suggest?

Can I just continue using NUnut in the same manner as I have with C#?

Thanks

Glenn

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/testdrivendevelopment/

<*> To unsubscribe from this group, send an email to:
    testdrivendevelopment-unsubscribe <at> yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Anthony Moralez | 6 May 00:49 2005
Picon

Re: Visual Studio .net - C++ - Unit Test

The unit test frameworks I've seen for C++ are

CPPUNIT < http://cppunit.sourceforge.net >
CppUnitLite < http://c2.com/cgi/wiki?CppUnitLite >
UnitTestHarness <
http://www.fitnesse.org/FitServers.CppFit.CppTestTools.UnitTestHarness
>

CPPUNIT is feature rich. CppUnitLite and UnitTestHarness are both
lightweight and expect you to extend them when you need more. The nice
thing about UnitTestHarness is the Memory Leak Detection. I use
CPPUNIT at work.

I think NUnit can be used if you are using "managed" C++ and creating
a .NET assembly, but I've never tried.

Good Luck,
Anthony Moralez

On 5/5/05, Glenn Halstead <glenn <at> glennh.com> wrote:
> I've been doing some TDD with C# - and Ron Jefferies book - Extreme
> Programming Adventures in C#.
> 
> I'll soon be doing some C++ development  - extending some existing code
> which has with no unit tests.
> 
> What unit test framework would folks suggest?
> 
> Can I just continue using NUnut in the same manner as I have with C#?
> 
(Continue reading)

Ronald Vijay | 6 May 05:40 2005
Picon

For Delphi

Hello,

I am vijay from India. I have a Delphi Application with lots of DLL's 
(projects) on this function. Could some body please help in this 
regards.
Advance thanks,
Vijay Kumar k

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/testdrivendevelopment/

<*> To unsubscribe from this group, send an email to:
    testdrivendevelopment-unsubscribe <at> yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Gmane