ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Automatic tests/mockup comparable to a maven flow

Post new topic  Reply to topic
 Automatic tests/mockup comparable to a maven flow « View previous topic :: View next topic » 
Author Message
Souciance_Rashti
PostPosted: Tue May 09, 2017 2:34 am    Post subject: Automatic tests/mockup comparable to a maven flow Reply with quote

Newbie

Joined: 09 May 2017
Posts: 7

Hello,

Is there something equivalent to a maven flow in IIB 10 with regards to test and build? Here is my scenario.

1. Rather than starting with writing a message a flow, I want to start to write the tests. Running the test first time will off course result in error.
2. As I write/create my message flow the tests should start to pass until all the tests are green.
3. I would like to run the tests when I build the bar file so that I know that any changes introduced didn't break the existing functionality.

Does something like that exist out of the box or would you have write something on your own?

Thanks
Souciance
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue May 09, 2017 3:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Have you considered simply using Maven?

What you're talking about, fundamentally, is a development workflow - i.e. test driven development. Such a workflow should easily apply to any kind of software development, and will apply to message flows.

You can put together an ant file, or other such, to do the build and deploy of your message flow. I would expect (but don't know, since I've never used Maven) that you can run that ant flow from Maven as part of your Maven workflow.

After that, it's a matter of sending and receiving messages from your message flow and making sure that the results are correct.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Souciance_Rashti
PostPosted: Tue May 09, 2017 4:30 am    Post subject: Reply with quote

Newbie

Joined: 09 May 2017
Posts: 7

Ok, it would be something to build on your own then via Ant or Maven.

Ideally, it would be great to have ways to mock away certain nodes that are actually connect to endpoints that are not available without changing the flow itself. That can then be used as part of test.

For instance you may have an SAP adapter that connects to SAP. But this is not available to you locally so in your tests you mock that way and simply inject the idoc message you want to test the flow.

To accomplish that I guess you would have to write the message flow programatically using the Integration API?
Back to top
View user's profile Send private message
Souciance_Rashti
PostPosted: Tue May 09, 2017 4:31 am    Post subject: Reply with quote

Newbie

Joined: 09 May 2017
Posts: 7

A clarification:

I meant running the previous scenario in an automatic manner.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 09, 2017 4:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Souciance_Rashti wrote:
A clarification:

I meant running the previous scenario in an automatic manner.


Have you considered the use of JUnit?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Souciance_Rashti
PostPosted: Tue May 09, 2017 4:44 am    Post subject: Reply with quote

Newbie

Joined: 09 May 2017
Posts: 7

fjb_saper wrote:
Souciance_Rashti wrote:
A clarification:

I meant running the previous scenario in an automatic manner.


Have you considered the use of JUnit?


How would you use JUnit to test part of or a complete message flow? Especially if they contain only standard nodes and esql modules?
Back to top
View user's profile Send private message
ceteareth
PostPosted: Mon Jul 24, 2017 11:59 pm    Post subject: Reply with quote

Acolyte

Joined: 12 Aug 2012
Posts: 51

right now im thinking of the same thing....

you can use junit to send a HTTP request or send a message to a queue then get the response. afterwards you can compare actual and expected response.

Now the problem here is how bout asynchronous requests. Will you be satisfied to just check that you should receive empty response(HTTP 200 OK) ??
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jul 25, 2017 4:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

ceteareth wrote:
right now im thinking of the same thing....

you can use junit to send a HTTP request or send a message to a queue then get the response. afterwards you can compare actual and expected response.

Now the problem here is how bout asynchronous requests. Will you be satisfied to just check that you should receive empty response(HTTP 200 OK) ??


Surely Junit would let you wait for a second response or make a second call to get the async response?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
ceteareth
PostPosted: Wed Jul 26, 2017 5:29 pm    Post subject: Reply with quote

Acolyte

Joined: 12 Aug 2012
Posts: 51

theres no async response.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jul 27, 2017 3:49 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

ceteareth wrote:
theres no async response.


Then why is it a request?

A request gets a response. An HTTP call gets a return code.

The HTTP response code from your async request indicates that the request has been received - not that it has been processed.

THe response code from a synchronous request indicates that the message has been received - and will include whatever data is supposed to be included as a response to that call.

So - async http return code == message received, sync http return code = message processed or not, with data in the message body.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Automatic tests/mockup comparable to a maven flow
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.