1 Reply Latest reply on Jan 6, 2004 1:02 AM by Elias Ross

    Need JUnit type framework to test MDB

    joshlam Newbie

      Hi,

      Is there a JUnit type framework that can be used to test MDBs? For instance, there is HttpUnit that can be used to test servlets and I am just looking for something similiar to test MDBs.

      Thanks.

      --
      Josh

        • 1. Re: Need JUnit type framework to test MDB
          Elias Ross Master


          I haven't seen that sort of framework in JBoss or elsewhere.

          (You could contribute one.)

          The problem is that a MDB may or may not have any particular outputs, like a web server. Depending on what your MDB does, it might update the database or send a file to an FTP site. It is just a matter of sending a message to the MDB deployed on JBoss (10-15 lines of code, really) then checking to see that it did what it was supposed to do. You can also check if a message was processed using a message selector or remote JMX.