Client Mock Factory
The benefit of using a mock factory object as opposed to a service is that it provides a light-weight alternative that does not require the creation of a new service on the server.
Unit Test Framework provides an option to dynamically push the classes needed for supporting the mock factory on the server during test execution. This option can be used to avoid the need for frequent restart when Java objects are changing. Once stabilized, it would be helpful to deploy the code to the server as this feature is experimental in nature and will only work if the dependency tree is not too complex. Using the user interface, you can set the option to dynamically push the objects to the server.
If the option is disabled, enable the corresponding preference as discussed in the Advanced section.
webMethods expression | JXPath equivalent |
PosRequest/ns:Log/ns:Transaction[0]/@Flag | PosRequest[@name='ns:Log'][@name='ns:Transaction'][1][@name='@Flag'] |
PosRequest/ns:Log/ns:Transaction[0]/ns:BUnit[0]/ns:ID/*body | PosRequest[@name='ns:Log'][@name='ns:Transaction'][1][@name='ns:BUnit'][1][@name='ns:ID'][@name='*body'] |