IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Enabling a custom java test case in Integration Server (WmTestCase / JUnit)

  • 1.  Enabling a custom java test case in Integration Server (WmTestCase / JUnit)

    Posted Fri June 02, 2023 07:50 AM

    What is the recommended way of enabling a custom java test case class in Integration Server?
    Do I need to compile the class and move it to IS?
    The tests inside the class work from the client when I run maven test, until I attempt to mock a service with a custom MockDataFactory.
    When the service is about to be mocked, the entire invoked (tested) service crashes, with the lastError set to “java.lang.NoClassDefFoundError: org/wmtestsuite/…/MyTestCase1”, implying IS doesn’t recognize the test case class.


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Enabling a custom java test case in Integration Server (WmTestCase / JUnit)

    Posted Mon June 05, 2023 02:08 AM

    MockDataFactory class needs to be defined at Client side i.e., in the Java project only. WmTestSuite internally takes care of transferring and loading the same in server.

    In general, if user wants to load classes, code\source is where java types are declared. User can then use jcode utilities for compilation or asset generation. Server implicitly loads classes from code\classes location.

    Would recommend having a look at this article around triggering WmTestSuite test cases and derive corresponding maven configuration from there on. Test Suite Executor - Knowledge base - webMethods - Software AG Tech Community & Forums


    #Integration-Server-and-ESB
    #webMethods