COM and unit tests 
Author Message
 COM and unit tests

Hi Blair,

I have a particular TestCase subclass with five or so tests.  Individually
they all run to completion.  The first test will auto-activate a COM server,
also written in Dolphin and deployed to an exe.  With the server _not_
running, and all tests run via Run-all in the SUnit browser, the image stops
respondnig shortly after the first test runs - I'm still trying to bracket
exactly where it hangs, and it might not be consistent.  I have yet to lock
it up if the COM server is running before the tests start.

Is it reasonable to assume that the problem has something to do with failure
to serve the message queue before freeing one interface pointer and grabbing
another?  Any other theories or suggestions for fixing it?  I don't want to
dismiss the problem too easily just in case it's pointing to a real problem
and not merely an artifact of trying to test inherently asynchronous
activity (which has been a big issue with some of the other tests in this
class).

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.



Thu, 28 Apr 2005 02:55:41 GMT  
 COM and unit tests
Bill

There are a couple of issues/possible problems here. In order to help,
I'd need to know whether the tests work when run with the standard SUnit
TestRunner. Also, presuming test ordering (as you said, the first test
will auto-activate the COM server) is definitely not the way to
implement things. TestResources would be the way to do it. Please give
me a bit more info, and I'll be happy to coach you through what to do here.

Cheers

Quote:

>Hi Blair,

>I have a particular TestCase subclass with five or so tests.  Individually
>they all run to completion.  The first test will auto-activate a COM server,
>also written in Dolphin and deployed to an exe.  With the server _not_
>running, and all tests run via Run-all in the SUnit browser, the image stops
>respondnig shortly after the first test runs - I'm still trying to bracket
>exactly where it hangs, and it might not be consistent.  I have yet to lock
>it up if the COM server is running before the tests start.

>Is it reasonable to assume that the problem has something to do with failure
>to serve the message queue before freeing one interface pointer and grabbing
>another?  Any other theories or suggestions for fixing it?  I don't want to
>dismiss the problem too easily just in case it's pointing to a real problem
>and not merely an artifact of trying to test inherently asynchronous
>activity (which has been a big issue with some of the other tests in this
>class).

>Have a good one,

>Bill

>--
>Wilhelm K. Schwab, Ph.D.


--
--
Joseph Pelrine [ | ]
MetaProg GmbH

Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson

--
--
Joseph Pelrine [ | ]
MetaProg GmbH

Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson



Thu, 28 Apr 2005 14:26:44 GMT  
 COM and unit tests
Joseph,

Quote:
> There are a couple of issues/possible problems here. In order to help,
> I'd need to know whether the tests work when run with the standard SUnit
> TestRunner.

The behavior is identical.  Running the COM server first allows the tests to
run to completion; it locks up and fails to display a mouse cursor when the
COM server is allowed to auto-activate during the first test.

Quote:
> Also, presuming test ordering (as you said, the first test
> will auto-activate the COM server) is definitely not the way to
> implement things. TestResources would be the way to do it. Please give
> me a bit more info, and I'll be happy to coach you through what to do

here.

What else do you need?  I've wondered what test resources were all about.
One thing though: I'm still entertaining the thought that there is something
really wrong here, and if that's the case, one could argue that moving the
activation to a resource would be masking the bug.  With that said, please
start coaching.

Thanks!

Bill

--
Wilhelm K. Schwab, Ph.D.



Mon, 02 May 2005 04:10:07 GMT  
 COM and unit tests

Quote:

>Joseph,

>>There are a couple of issues/possible problems here. In order to help,
>>I'd need to know whether the tests work when run with the standard SUnit
>>TestRunner.

>The behavior is identical.  Running the COM server first allows the tests to
>run to completion; it locks up and fails to display a mouse cursor when the
>COM server is allowed to auto-activate during the first test.

OK. There are some issues with the way Jeff's browser runs the tests as
compared to the standard SUnit TestRunner, that's all. AFAIK, Jeff's
just about to post a new version. Jeff?

Quote:
>>Also, presuming test ordering (as you said, the first test
>>will auto-activate the COM server) is definitely not the way to
>>implement things. TestResources would be the way to do it. Please give
>>me a bit more info, and I'll be happy to coach you through what to do

>here.

>What else do you need?  I've wondered what test resources were all about.
>One thing though: I'm still entertaining the thought that there is something
>really wrong here, and if that's the case, one could argue that moving the
>activation to a resource would be masking the bug.  With that said, please
>start coaching.

Sorry, but could we wait a few days <g>? I fly off to do a talk in
Brussels tomorrow, and then it's on to London, where I get to see Andy &
Blair do the talking dog show once again ;-) I'll be back online Monday.
If I do something, I want to (have the time to) do it right.

Cheers

--
--
Joseph Pelrine [ | ]
MetaProg GmbH

Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson



Mon, 02 May 2005 05:00:04 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Test::Unit::Mock: Mock objects for testing with Test::Unit

2. using test::unit for C++ unit tests

3. Test order in Test::Unit

4. Test order in Test::Unit

5. Automating UI tests (was Re: Art of Unit Testing)

6. Unit testing data; What to test

7. Test Tool for Unit Tests?

8. Report on Unit Testing MVP Presenters.

9. Newbie: Unit testing presenters?

10. Unit Test guidelines

11. ANSI Standard Messages Unit Tests

 

 
Powered by phpBB® Forum Software