You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Goyal, Arpit" <ar...@sap.com> on 2016/09/24 07:24:55 UTC

How to test Camel-http outbound calls

We have to validate whether the authentication and encryption aspect of HTTP outbound calls are working properly. On searching most of the testing pointers are to mock the component and verify the values being sent to HTTP endpoint. But based on the link [1] there is a comment at the end which talks about using Jetty consumer to verify whether http calls are successful making it more of an integration test rather than unit test.

Is such kind of integration test standard practice with camel HTTP (or SOAP) outbound calls?

Also, we regularly update our camel version to pick the latest version. Sometimes jars could be missed and such test helps in through unresolved runtime-dependencies. So thinking of having such integration tests.

Regards,
Arpit.


[1] - http://stackoverflow.com/questions/37290910/camel-junit-test-http-component-with-bean-component

Re: How to test Camel-http outbound calls

Posted by Tadayoshi Sato <sa...@gmail.com>.
Hello,

Whether or not it's a standard practice, I don't think there is any other
good approach than either mocking the component and checking the headers,
or using an embedded Jetty server inside the test case. Also, such kind of
integration test should be more reliable if you want to repeatedly check
missing runtime dependencies.

Best regards,
Tadayoshi

On Sat, Sep 24, 2016 at 4:24 PM, Goyal, Arpit <ar...@sap.com> wrote:

> We have to validate whether the authentication and encryption aspect of
> HTTP outbound calls are working properly. On searching most of the testing
> pointers are to mock the component and verify the values being sent to HTTP
> endpoint. But based on the link [1] there is a comment at the end which
> talks about using Jetty consumer to verify whether http calls are
> successful making it more of an integration test rather than unit test.
>
> Is such kind of integration test standard practice with camel HTTP (or
> SOAP) outbound calls?
>
> Also, we regularly update our camel version to pick the latest version.
> Sometimes jars could be missed and such test helps in through unresolved
> runtime-dependencies. So thinking of having such integration tests.
>
> Regards,
> Arpit.
>
>
> [1] - http://stackoverflow.com/questions/37290910/camel-
> junit-test-http-component-with-bean-component
>