Re: [Cppunit-devel] COM testing
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2001-10-05 13:50:15
|
Quoting ms...@te...: > > Another issue is how to write VB applications to test COM Components > and > still rely on CppUnit? > > Thanks, > > M Well, If I sum up you want: - test the COM interface with CppUnit - test the COM interface from VB - test the C++ object used to implement the interface with CppUnit (?) I don't have much experience with COM, and I never wrote any test for a COM object. All I can give you is pointers: Check the extreme progamming mailing list (http://groups.yahoo.com/group/extremeprogramming), there was two recents thread that might be of interest for you: XP & COM (started on 28/09), and, VB UNIT. There is also a new article on Martin Fowler page (http://martinfowler.com/) discussing Continuous Integration with C++ and COM. If I remember what I read, they basicaly advice to unit test the C++ object hiding behind the COM interface independently from the COM interface. Also, I think that generating an MFC wrapper for the COM interface (that's what you're doing, right ?) may lead to some maintenance trouble if you evolve the interface (you have to regenerate a wrapper by hand, and it won't allow for the same class name if I remember from my past experience). The alternative to MFC wrapper if I remember is to use a pure abstract class that is generated from the interface definition, and the helper (ATL library?) to use it. This might be better because you get compilation break if the interface change, and you don't have to manually update the wrapper. On the other hand, it's probably harder to use. One thing I don't get though, if you are using VB UNIT (available at http://www.xprogramming.com/software.htm) to test the COM interface, why to you also want to test them with C++ (which would lead to double maintenance of tests) ? Baptiste. > > > > > ms...@te...@lists.sourceforge.net on 05.10.2001 12:07:51 > > Sent by: cpp...@li... > > > To: cpp...@li... > cc: > > Subject: Re: [Cppunit-devel] COM testing > > > > Thanks for your reply Jean Baptiste, > > To write test cases that are testing our COM components I'm using the > MSDEV > Class Wizard to generate the helper classes. > > CppUnit is still the framework that handle test creation, execution > etc... > > The question is in fact : Do you have any recommendations or > alternatives > to work this ? > > Regards, > > Marc > > > > > > > Baptiste Lepilleur <gai...@fr...>@lists.sourceforge.net on > 05.10.2001 > 11:43:13 > > Sent by: cpp...@li... > > > To: ms...@te... > cc: cpp...@li... > > Subject: Re: [Cppunit-devel] COM testing > > > Quoting ms...@te...: > > > Hi, > > > > I'm currently using cppunit against C++ code, and was wondering if > you > > already think about a solution to > > test COM code. > > Can you precise your question ? Are you asking if somebody has > already > wrote > some helper class for testing COM, or are you experiencing problem > running > your > COM test case with CppUnit ? > > Baptiste. > > > Thanks for your help, > > > > Marc --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Language: English, French |