Loading ...
Sorry, an error occurred while loading the content.

RE: [XP] Mock Objects in a COM Web World

Expand Messages
  • wecaputo@thoughtworks.com
    ... least to the extent that I was describing a possible test technique. Given XP s test-first philosophy, I think that any and all testing tricks are XP
    Message 1 of 19 , Sep 1, 2000
    • 0 Attachment
      >I was thinking about that last night...And I suppose it is XP related, at
      least to the extent that I was describing a possible test technique. Given
      XP's test-first >philosophy, I think that any and all testing tricks are XP
      related.


      Writing Testable code is (as was pointed out in another post recently) one
      of the changes that XP brings to one's coding. Seeing as how I am trying to
      keep testFirst in my playbook, and I am writing COM code, I found this
      thread VERY relevant to the list, and not pollution at all.


      >I suppose what I was referring to was me getting into the details of how
      one might implement the trick...but then again, I guess that's the point!


      I think it was a very good technique, not simply a trick at all. FWIW I
      thought it a great idea. I am looking forward to trying it. and to any
      additional posts that follow on this thread about testing COM.


      There have been many implementation specfic examples of Java testing before
      on this list for example, and I found those helpful (and I am sure those
      participating felt they were quite relevant) so too I am sure there are
      others lurking here who are glad to see what you have learned about testing
      COM.


      Thanks Bram,


      Bill
    • Philip Craig
      I don t think it s pollution at all. If you are XPing in a Microsoft world, check out NetUnit at: http://www.xpdeveloper.com/cgi-bin/wiki.cgi?NetUnit Full
      Message 2 of 19 , Sep 1, 2000
      • 0 Attachment
        I don't think it's pollution at all.

        If you are XPing in a Microsoft world, check out NetUnit at:

        http://www.xpdeveloper.com/cgi-bin/wiki.cgi?NetUnit

        Full JUnit (bar the GUI) for .Net components.

        --- In extremeprogramming@egroups.com, "Morris, Chris" <ChrisM@S...>
        wrote:

        IMO, this is XP related ... I know I'll be heading off to more and
        more internet development in the next year or so -- and we're a MS
        shop at the moment, so I'm interested in anything related to COM
        testing...

        This is my last e-mail on this. Sorry to pollute your readers with
        non-XP mail!
      • rgams@core.com
        -- Original Message ----- From: art_thursland@tspb.com Date: Friday, September 1, 2000 9:33 am Subject: Re: RE: [XP] Mock Objects in a COM Web World ... We
        Message 3 of 19 , Sep 1, 2000
        • 0 Attachment
          -- Original Message -----
          From: art_thursland@...
          Date: Friday, September 1, 2000 9:33 am
          Subject: Re: RE: [XP] Mock Objects in a COM Web World

          >
          > Dick wrote:
          >
          >
          > > We have written a test harness that instantiates COM objects and
          > > exercises the methods. There is no test code in either the COM
          > object> or in the application(s) that use it. Once the COM object
          > tests> properly, it becomes a black box that other applications
          > may be clients
          > > for.
          >
          > Why didn't you use VbUnit? It can test a COM object written in any
          > language.
          >

          We could have used VBUnit or CppUnit - that we wrote our own framework
          had to do with other functionality we needed. The point is that we
          test the COM object by testing the interface - a black box test I guess.

          > Your testing strategy is fine if your COM objects don't
          > instantiate other
          > COM objects.

          I don't see why that makes a difference. We test each COM object
          individually. If it passes, it should be usable in other contexts
          without additional testing. The only thing we test at any time is the
          interface of the current object. The fact that this object is creating
          other COM objects seems irrelevant.

          Dick
        • art_thursland@tspb.com
          Dick wrote ... object. ... In the application I m working on there are business COM objects that create data access COM objects. There is also a lot of
          Message 4 of 19 , Sep 1, 2000
          • 0 Attachment
            Dick wrote

            > The only thing we test at any time is the interface of the current
            object.
            > The fact that this object is creating other COM objects seems irrelevant.

            In the application I'm working on there are business COM objects that
            create data access COM objects. There is also a lot of VBScript on the
            Active Server Pages that shouldn't, in my opinion, be there. I'd like to
            move as much of the VBScript as I can to an application facade COM object
            so that I can test it. For a variety of reasons I want to test the
            business COM objects without actually talking to the back end database. I
            also want to test the application facade COM objects without talking to the
            actual business objects. With your strategy the unit tests for the upper
            layers become more like functional tests, since you're testing the whole
            component hierarchy. It can also be difficult to generate an abnormal
            condition in the lower level COM object that you might want to test for. I
            think I can get better test coverage with my strategy. Time will tell.

            Best Regards,

            Art
          Your message has been successfully submitted and would be delivered to recipients shortly.