Camel - Test driven development

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Camel - Test driven development

Gnanaguru S

What is the benefit of Unit testing Camel routes before creating the context ?

In terms of test driven developement, Before writing my camel context Lets say I am writing 5 unit test cases to test my routes.

Also Lets assume the runtime is Fuse/Servicemix. In this kind of containers, is test driven development a advantage or disadvantage in Camel development point of view ?

Camel is rich in components, It helps to connect hetergenous systems through its components. Configuring components takes it time, Although writing unit test cases isnt a double effort ? ( In case of test driven development ) / Effort which can drag the development cycle ?

Just thought of brain stroming this topic in this Camel forum, because it may help many developers to understand its significance.

Cheers
Guru
gnanaguru.com
Reply | Threaded
Open this post in threaded view
|

Re: Camel - Test driven development

Willem.Jiang
Administrator
As Camel route provides some abstraction of message routing, when you write the route, you don’t need to take care of the component implementation. All you need to do is make sure the camel route works as you expected first. 

With the help of camel unit test, we can make sure the camel route works, then you can add more integration test to make sure the camel component works as you expected. 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 31, 2014 at 1:27:48 PM, Gnanaguru S ([hidden email]) wrote:

>  
> What is the benefit of Unit testing Camel routes before creating the context
> ?
>  
> In terms of test driven developement, Before writing my camel context Lets
> say I am writing 5 unit test cases to test my routes.
>  
> Also Lets assume the runtime is Fuse/Servicemix. In this kind of containers,
> is test driven development a advantage or disadvantage in Camel development
> point of view ?
>  
> Camel is rich in components, It helps to connect hetergenous systems through
> its components. Configuring components takes it time, Although writing unit
> test cases isnt a double effort ? ( In case of test driven development ) /
> Effort which can drag the development cycle ?
>  
> Just thought of brain stroming this topic in this Camel forum, because it
> may help many developers to understand its significance.
>  
> Cheers
> Guru
> gnanaguru.com
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Test-driven-development-tp5749539.html 
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  

Reply | Threaded
Open this post in threaded view
|

Re: Camel - Test driven development

bibryam
In reply to this post by Gnanaguru S
Writing tests always require extra effort, but in return it gives
confidence in the code. It is a cost/benefit judgment.

If you unit test your routes, it verifies the behavior of the route
regardless of the runtime environment (Servicemix or Fuse). But your will
need also some integration tests to verify whether the endpoint
configurations are correct and whether runtime wiring is in place.

HTH,



On 31 March 2014 05:04, Gnanaguru S <[hidden email]> wrote:

>
> What is the benefit of Unit testing Camel routes before creating the
> context
> ?
>
> In terms of test driven developement, Before writing my camel context Lets
> say I am writing 5 unit test cases to test my routes.
>
> Also Lets assume the runtime is Fuse/Servicemix. In this kind of
> containers,
> is test driven development a advantage or disadvantage in Camel development
> point of view ?
>
> Camel is rich in components, It helps to connect hetergenous systems
> through
> its components. Configuring components takes it time, Although writing unit
> test cases isnt a double effort ? ( In case of test driven development ) /
> Effort which can drag the development cycle ?
>
> Just thought of brain stroming this topic in this Camel forum, because it
> may help many developers to understand its significance.
>
> Cheers
> Guru
> gnanaguru.com
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Test-driven-development-tp5749539.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--
Bilgin Ibryam

Apache Camel & Apache OFBiz committer
Blog: ofbizian.com
Twitter: @bibryam <https://twitter.com/bibryam>

Author of Instant Apache Camel Message Routing
http://www.amazon.com/dp/1783283475
Reply | Threaded
Open this post in threaded view
|

Re: Camel - Test driven development

Gnanaguru S
In reply to this post by Gnanaguru S

Finally I ended up writing a article on Camel unit testing today :)

http://bushorn.com/unit-testing-apache-camel/

Cheers
Guru
gnanaguru.com
Reply | Threaded
Open this post in threaded view
|

Re: Camel - Test driven development

Claus Ibsen-2
On Fri, Apr 4, 2014 at 12:37 PM, Gnanaguru S <[hidden email]> wrote:
>
> Finally I ended up writing a article on Camel unit testing today :)
>
> http://bushorn.com/unit-testing-apache-camel/
>

Hi

Thanks for sharing your blog post. I added a link to it from our link
collection at
http://camel.apache.org/articles

> Cheers
> Guru
> gnanaguru.com
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Test-driven-development-tp5749539p5749791.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io