Reputation: 115
In our mule projects - we currently have our integration testcases call the actual external webservices (in house). This we obviously want to get rid of and have mock services for the external services, as we are almost done with setting up our build server for the mule projects.
I see that there are a lot of options available out there for mocking in mule flows:
Kindly let me know your inputs. Thanks and regards, Priya
Upvotes: 1
Views: 1284
Reputation: 2475
I am one of the authors of confluex-mock-http, and am currently in the process of migrating the project to https://github.com/shamsoftware/sham-http . So, I am probably biased :)
I prefer to start an HTTP server in process, and that's why I helped build a project that does that. The library was made specifically because we had solved this problem several times using option 3. :)
I am about to spend some effort getting a release of sham-http out, and I plan to make it compatible with Mule 3.6.0. If you're using a different version, be sure to add an issue to make it compatible with whatever version you're using :)
Upvotes: 0
Reputation: 520
i feel it better to use munit xml configuration approach for testing mule flows.
you can mock the service, by specifying the required response to the mocking component for the web-service which is simple and preferable approach.For the mocking component you set the inbount properties like 'http.status'..etc ..respective properties which will be required in the next flow message processors.
Upvotes: 0
Reputation: 712
If you ask me I'll go with Munit, I understand that the BETA could be a little bit scary but:
That's what regards to code stability. That said, Munit provide lots of other features besides of just mocking your flows, and at some point I reckon you may like not only to do unit testing of your mule application but integration test which you can also do with Munit.
Generally speaking your other options, while applicable, still relies in somewhat external systems while Munit is a native way to isolate your Mule code and avoid it from making external calls.
HTH
Upvotes: 2