Service Virtualization

 View Only
  • 1.  Creation of drainers in Devtest

    Posted Sep 26, 2019 01:15 AM
    Edited by Sumalatha A N Sep 26, 2019 01:15 AM
    Hi Team,

    we are getting the requirement to drain the messages(clear all the messages, may be in thousands in number during functional or performance testing) from a particular queue. The drainer should be running all the time.

    for this currently, we are creating the VSM and adding only one single step "IBM MQ Native VSE Listen" step and providing the queue and queue manager details over there from which the messages to be cleared off and routing the same step back again and deploying to the VSE.

    Attached the sample drainer VSM for reference.

    Now since we are getting lot of similar requirements, we are analyzing if this could be optimized, say we have to clear messages from 10 to 15 different queues , instead of creating 15 different VSM, is there a way where we can accommodate all in one VSM?

    Please provide your suggestions here




    ------------------------------
    Thank you
    ------------------------------


  • 2.  RE: Creation of drainers in Devtest

    Posted Sep 26, 2019 02:07 AM
    Hi Sumta,

    I have done a similar setup once for this. I used the following approach.

    1. Create a dataset of different queues with configurations (in case QM, etc changes for every queue)
    2. Create a looping test case with counter (based on your requirement) with the dataset details to execute for all entries. Example 2 loops 1 for data set and 2nd for number of iterations
    3. Either deploy it on CVS or run it manually to drain the queues.

    Also, you can get the queue expiration time set to a reduced value which will automatically discard the messages after a predefined interval.

    Lastly, you can have a single testcase with multiple config files and execute them parallelly using CVS at scheduled intervals.

    Thanks.

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 3.  RE: Creation of drainers in Devtest

    Posted Sep 26, 2019 02:58 AM
    Thanks Vaibhav,

    Could you please share if you have any sample test case for the approach as detailed above


  • 4.  RE: Creation of drainers in Devtest

    Posted Oct 23, 2019 01:41 AM
    Edited by Sumalatha A N Oct 23, 2019 01:42 AM
    Hi Vaibhav and team,

    i have followed the below approach :

    1. Created a VSM , added a dataset with different queues and queue manager details in it. As a next step added IBM MQ Native Listen step and after this step directed to the step where data set is added. VSM will continuously read through the data set and execute the Listen step one by one to clear the messages from each queue without any break point.

    2. Deployed the VSM to the VSE server, observed that the VSE server coming down and post restart of the VSE , monitored the  inspection view of the VSM deployed, it is observed that there are warn messages saying "SimulatorOverloaded".

    Does this meant that this approach needs some correction. Please share your Insights on the same.Have attached the sample VSM for reference.

    Attachment(s)

    zip
    drainer.zip   9 KB 1 version


  • 5.  RE: Creation of drainers in Devtest

    Posted Oct 23, 2019 02:27 AM
    Hi Sumalatha,

    You should create a test case instead of VSM and deploy it on CVS. Also, you can use the "IBM Native Send or Receive"  or "IBM Websphere MQ" to consume the messages in an iterative manner.

    I have attached a sample structure for the same for your reference:

    Thanks.

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 6.  RE: Creation of drainers in Devtest

    Posted Oct 23, 2019 04:51 AM
    Thanks for the reply Vaibhav.

    Could you please share the test case attachment as it helps me to analyze what  the Counter_for_Iteration data set  on top of IBM MQ Native step is doing.


  • 7.  RE: Creation of drainers in Devtest

    Posted Oct 23, 2019 05:14 AM
      |   view attached
    Hi Sumalatha,

    PFA the test case (It is for reference only as I don't have any queues available on my local).

    The counter value is for defining iteration for dequeuing the messages.

    The attached examples flow is :
    1. get the row details from Excel for 1st queue configuration
    2. Read the messages from the queue in an iterative manner (you can define loop iterations to have optimal performance, example: 10)
    3. Once the counter reaches the threshold value, the control will be sent back to step 1 to fetch the next Queue Details from Excel and go one.
    4. On the end of Data in excel, the test case will end

    You can schedule the above test case to get executed at a predefined frequency in CVS (say once in an hour or 2 hours)

    Hope this will help. Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------

    Attachment(s)

    zip
    test.zip   2 KB 1 version


  • 8.  RE: Creation of drainers in Devtest

    Posted Oct 23, 2019 07:35 AM
    Hi Vaibhav,

    Thank you for sharing the sample test case.

    counter iteration data set will iterate only for some mentioned number right, for example if you mention the limit as 50, then the test case will clear only 50 messages from each queue defined in the excel sheet.

    if in case there are some 1000's of messages (we dont know the exact number) to be cleared from the queue especially during performance testing, then in this case, how can this be achieved.

    Could you please suggest here.

    Thank you in advance.


  • 9.  RE: Creation of drainers in Devtest

    Posted Oct 24, 2019 12:17 AM
    Hi Sumalatha,

    As you don't have the exact number of messages, you can leverage CVS to run regular interval iterations to clear it (let's say every 5-10 minutes for overnight).

    Also, Have multiple CVS test cases (each test case will dequeue from one queue) - set the count for some 50-70 messages (dependent on the Devtest machine configuration) and keep them running in parallel at predefined intervals

    Following are a few other options:
    1. You can have virtual services for each queue and keep them running so that any messages will be dequeued at runtime
    2. You can get the message expiry set at MQ level (it is a meta-data property for queue)- with this, your messages will be active only for a defined duration and discarded post that.

    Thanks.

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 10.  RE: Creation of drainers in Devtest

    Posted Oct 24, 2019 07:30 AM
    Thanks Vaibhav . Will  see it to work.