{"id":8438,"date":"2024-11-24T23:43:29","date_gmt":"2024-11-24T23:43:29","guid":{"rendered":"https:\/\/www.softwaretestinghelp.com\/?p=8438"},"modified":"2025-05-09T10:52:28","modified_gmt":"2025-05-09T10:52:28","slug":"messaging-queue-mq-testing","status":"publish","type":"post","link":"https:\/\/www.softwaretestinghelp.com\/messaging-queue-mq-testing\/","title":{"rendered":"How to Test Application Messaging Queue"},"content":{"rendered":"<p><strong>Let us see what the Messaging Queue is:<\/strong><\/p>\n<p><strong>Messaging Queue (MQ)<\/strong>, a message oriented middleware tool, has been an <a href=\"http:\/\/www-03.ibm.com\/software\/products\/en\/ibm-mq\" target=\"_blank\" rel=\"noopener nofollow\">IBM<\/a> product since 1992. It is very helpful to communicate messages (XML\/text file\/HTML file etc.) in <a href=\"https:\/\/www.softwaretestinghelp.com\/soa-testing\/\">SOA<\/a> (service Oriented Architecture) on over 80 platforms.<\/p>\n<p>It is reliable and provides a secure, assured communication medium and an excellent messaging solution to <strong>Enterprise Architecture<\/strong> across the globe.<\/p>\n<p><strong><em>Today\u2019s article is about testing Messaging Queue that facilitates transportation of messages between two applications\/modules.<\/em><\/strong><\/p>\n<p><em>This will help you test the connectivity between applications\/modules during message transportation.<\/em> <\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-13319\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/04\/Test-Application-Messaging-Queue.jpg\" alt=\"Test Application Messaging Queue\" width=\"485\" height=\"457\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/04\/Test-Application-Messaging-Queue.jpg 485w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/04\/Test-Application-Messaging-Queue-300x283.jpg 300w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/><\/p>\n<h3>Real time example of\u00a0<strong>Messaging Queue<\/strong> system<\/h3>\n<p>Take ICICI Bank, which includes many systems running in parallel to make one complete application. Assume that the <strong>ICICI Bank<\/strong> shows an annual profit margin of $100 Million for the year 2015.<\/p>\n<p>This profit would be an aggregate of all systems such as Savings Account, Credit Card Account, Home Loan Account and so on.<\/p>\n<p>ICICI bank as a parent system seeks communication from each of its individual systems. This communication can primarily be carried out by <strong>Messaging Queue<\/strong> system.<\/p>\n<p>Parent ICICI bank can send a request that it needs the gross profit of the Savings account application. The savings account application then calculates this information, stores it in the form of XML and places it in the remote queue.<\/p>\n<p>The parent system will then call the remote queue to retrieve this information.<\/p>\n<h3><strong>Application with MQ<\/strong><\/h3>\n<p>The key configuration in <strong>MQ<\/strong> is setting up the <strong>Queue Manager<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-13321\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/04\/MQ-Queue-manager-e1493016984929.jpg\" alt=\"MQ Queue manager\" width=\"485\" height=\"291\" \/><\/p>\n<p><strong><em>A few important details about the Queue Manager are mentioned below<\/em><\/strong><\/p>\n<ul>\n<li>It owns\/manages the complete functioning of the <strong>WebSphere MQ Application<\/strong>.<\/li>\n<li>We are not responsible for transmitting data.<\/li>\n<li>Contains a channel and port to transmit data to a particular destination queue or to store the message internally until another queue picks the message.<\/li>\n<li>Applications can have multiple Queue Managers\/channels to communicate messages.<\/li>\n<\/ul>\n<h3>Technical example<\/h3>\n<p>Let\u2019s assume there are applications <strong>APPS, APPP, APPF, APPL, APPD<\/strong>. All are communicating messages among each other. Some of them have <em>two-way communication structures<\/em>.<\/p>\n<ul>\n<li><strong>APPS<\/strong> is a sales application, with queue manager-APPSQM, channel-APPSCH, queue name-MQS, portnum-11112<\/li>\n<li><strong>APPP<\/strong> is a product processing application, with queue manager-APPPQM, channel-APPPCH, queue name-MQP, portnum-1111<\/li>\n<li><strong>APPF<\/strong> is a finished, fully functional application, with queue manager-APPFQM, channel-APPFCH, queue name-Mqf, portnum-1112<\/li>\n<li><strong>APPL<\/strong> is a logistics application, with queue manager-APPLQM, channel-APPLCH, queue name-MQD, portnum-1112<\/li>\n<li><strong>APPD<\/strong> is a delivery application, with queue manager-APPDQM, channel-APPDCH, queue name-MQD, portnum-1112<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-1.jpg\" rel=\"attachment wp-att-8440\"><img decoding=\"async\" class=\"alignnone wp-image-8440\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-1.jpg\" alt=\"Messaging Queue 1\" width=\"485\" height=\"37\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-1.jpg 674w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-1-300x23.jpg 300w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/><\/a><\/p>\n<h4><span style=\"color: #ff6600;\">Scenario 1 &#8211; APPS sends data to APPP<\/span><\/h4>\n<p>Each of the above applications will have two config files, application configuration, and <strong>Messaging Queue<\/strong> configuration. The application configuration contains details of procedures and data processing for the XML message.<\/p>\n<p>The <strong>MQ<\/strong> config file will have the <strong>MQ<\/strong> related details like queue manager-APPSQM, channel-APPSCH, queue name-MQS, portnum-1111.<\/p>\n<p><em><strong>(<\/strong><span style=\"color: #ff0000;\">Note:<\/span><strong> Click on the image for an enlarged view)<\/strong><\/em><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-2.jpg\" rel=\"attachment wp-att-8441\"><img decoding=\"async\" class=\"alignnone wp-image-8441 size-full\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-2.jpg\" alt=\"Messaging Queue 2\" width=\"527\" height=\"270\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-2.jpg 527w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-2-300x154.jpg 300w\" sizes=\"(max-width: 527px) 100vw, 527px\" \/><\/a><\/p>\n<p>Once the <strong>APPS<\/strong> application processes the data, it generates the XML message and puts it into the queue. <strong>The APPS<\/strong> job is done.<\/p>\n<p>It\u2019s time to pick the message from the other queue until then the Queue Manager will hold the data.<\/p>\n<p>Now let\u2019s say the <strong>APPP<\/strong> application should pick the XML message from the MQS queue. The <strong>APPP<\/strong> MQ config file is configured to fetch the XML message from the MQS queue.<\/p>\n<p>The MQP queue will fetch the XML message from the MQS queue and send it to <strong>APPP<\/strong> application for further processing.<\/p>\n<p>Similar processes are carried out by each application to obtain data from other applications.<\/p>\n<h4><span style=\"color: #ff6600;\">Scenario 2 &#8211; APPP sends data to APPS<\/span><\/h4>\n<p>This time the config files will be different on both sides. The MQ config file at <strong>APPP<\/strong> will have different queue info like Queue Manager-APPPQMR, channel-APPPCHR, queue name-MqpR, portnum-1111.<\/p>\n<p>The <strong>APPS<\/strong> will have different queue info like Queue manager-APPSQMR, channel-APPSCHR, queue name-MqsR, portnum-1111. Remember that the port numbers can be the same for a few applications as they can be connected as peers in the same system.<\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-3.jpg\" rel=\"attachment wp-att-8442\"><img decoding=\"async\" class=\"alignnone wp-image-8442 size-full\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-3.jpg\" alt=\"Messaging Queue 3\" width=\"525\" height=\"268\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-3.jpg 525w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-3-300x153.jpg 300w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/a><\/p>\n<p><strong>Therefore,<\/strong> all the applications will have to be configured accordingly to communicate messages among themselves.<\/p>\n<p>There is a possibility that a communication can happen between local applications that are in a current system with a remote application elsewhere. As mentioned above, both local and remote applications should have configuration files to set up in their server to enable communication.<\/p>\n<p><strong>As mentioned above,<\/strong> both local and remote applications should have configuration files to set up in their server to enable communication.<\/p>\n<h3>Functional Testing with MQ<\/h3>\n<p><em><strong>Testers will have to validate the following<\/strong><\/em><\/p>\n<ul>\n<li>Application configuration<\/li>\n<li>Queue configuration<\/li>\n<li>Message format<\/li>\n<li>Message correctness and completeness<\/li>\n<li>Message transmission<\/li>\n<li>Message failures when they occur<\/li>\n<\/ul>\n<h3><strong>MQ in SOA<\/strong><\/h3>\n<p><strong>MQ<\/strong> is a reliable technique that can be used in <a href=\"https:\/\/en.wikipedia.org\/wiki\/Service-oriented_architecture\" target=\"_blank\" rel=\"noopener nofollow\">SOA <\/a>architecture to communicate messages among applications. As message communication is a key concept for running an ERP system, <strong>MQ<\/strong> provides the right solution for it.<\/p>\n<p>It is effortless and secure. Following an approach similar to the one shown in the technical example,<\/p>\n<p>Following an approach similar to the one shown in the technical example, <strong>Messaging Queue<\/strong> can be set on multiple applications to fetch data from one or more apps.<\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-4.jpg\" rel=\"attachment wp-att-8444\"><img decoding=\"async\" class=\"alignnone wp-image-8444 size-full\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-4.jpg\" alt=\"Messaging Queue 4\" width=\"598\" height=\"384\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-4.jpg 598w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2016\/01\/Messaging-Queue-4-300x193.jpg 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/a><\/p>\n<p>By taking a look at the application architecture, more information can be obtained by testers about message communication connectivity between applications, E2E message flow, etc.<\/p>\n<p>In any case, MQ team or environment teams can provide additional details.<\/p>\n<p><strong>MQ simulator<\/strong> (such as <a href=\"http:\/\/www.ibm.com\/software\/websphere\" target=\"_blank\" rel=\"noopener nofollow\">IBM WebSphere<\/a>), which can transfer messages from inbound queue to an outbound queue, can be used to drop messages, monitor them and check the receipt at the outbound queue with variable configurations.<\/p>\n<h3>MQ related issues during testing<\/h3>\n<p>While testing the applications that communicate messages through <strong>Messaging Queue<\/strong>, there are many scenarios where messages can fail to transfer from one application to another.<\/p>\n<p><em><strong>Some of the Common problems are mentioned below<\/strong><\/em><\/p>\n<ul>\n<li>Input XML message format issues like incorrect header, metadata issue, format issues, data issues, etc..<\/li>\n<li>Incorrect queue config such as incorrect queue name, manager name, channel, port, etc.<\/li>\n<li>Message size may be greater than expected messages will fall into the error\/dead queue folder.<\/li>\n<li>Queue server issues, connectivity issues, remote queue issues, etc. leads to failure of message communication.<\/li>\n<\/ul>\n<h3>Conclusion<\/h3>\n<p>When testing apps that follow <strong>SOA<\/strong>, such as <strong>ERP systems<\/strong>, <strong>MQs<\/strong> are integral elements and as testers, it is a good idea to understand basic details about the same.<\/p>\n<p>We hope this article has succeeded in introducing the concept and opened avenues for further exploration and mastery.<\/p>\n<p><strong><em>About the\u00a0<\/em>author:<\/strong><em> This is a guest article by Asish K Mallik.<\/em><\/p>\n<p><em><strong>Please share your comments, questions, and inputs below.<\/strong><\/em><\/p>\n\r\n\t\t\t<div id=\"daexthefup-container\"\r\n\t\t\t\tclass=\"daexthefup-container daexthefup-layout-stacked daexthefup-alignment-center\"\r\n\t\t\t\tdata-post-id=\"8438\">\r\n\r\n\t\t\t\t<div class=\"daexthefup-feedback\">\r\n\t\t\t\t\t<div class=\"daexthefup-text\">\r\n\t\t\t\t\t\t<h3 class=\"daexthefup-title\">Was this helpful?<\/h3>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div class=\"daexthefup-buttons-container\">\r\n\t\t\t\t\t\t<div class=\"daexthefup-buttons\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefup-yes daexthefup-button daexthefup-button-type-icon\" data-value=\"1\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>.thumb-up-cls-1{fill:#c9c9c9;}.thumb-up-cls-2{fill:#e1e1e1;}.thumb-up-cls-3{fill:#676767;}<\/style>\r\n                    <\/defs>\r\n                    <g id=\"thumb_up\">\r\n                        <path class=\"thumb-up-cls-2 daexthefup-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <g>\r\n                            <rect class=\"thumb-up-cls-3 daexthefup-icon-secondary-color\" x=\"10\" y=\"20\" width=\"6\" height=\"15\" rx=\"1.5\" ry=\"1.5\" \/>\r\n                            <path class=\"thumb-up-cls-1 daexthefup-icon-primary-color\" d=\"m30.57,9.06l-.49-.1c-.81-.17-1.61.35-1.78,1.16l-5.3,11.74c-.17.81,3.16,1.61,3.97,1.78l1.96.41c.81.17,1.61-.35,1.78-1.16l2.18-10.27c.34-1.61-.7-3.21-2.31-3.56Z\" \/>\r\n                            <path class=\"thumb-up-cls-1 daexthefup-icon-primary-color\" d=\"m38.17,20h-18.67c-.83,0-1.5.67-1.5,1.5v12c0,.83.67,1.5,1.5,1.5h16.27c.71,0,1.33-.5,1.47-1.21l2.4-12c.19-.93-.53-1.8-1.47-1.8Z\" \/>\r\n                        <\/g>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefup-no daexthefup-button daexthefup-button-type-icon\" data-value=\"0\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>.thumb-down-cls-1{fill:#c9c9c9;}.thumb-down-cls-2{fill:#e1e1e1;}.thumb-down-cls-3{fill:#676767;}<\/style>\r\n                    <\/defs>\r\n                    <g id=\"thumb_down\">\r\n                        <path class=\"thumb-down-cls-2 daexthefup-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <g>\r\n                            <rect class=\"thumb-down-cls-3 daexthefup-icon-secondary-color\" x=\"10\" y=\"13\" width=\"6\" height=\"15\" rx=\"1.5\" ry=\"1.5\" \/>\r\n                            <path class=\"thumb-down-cls-1 daexthefup-icon-primary-color\" d=\"m30.57,38.94l-.49.1c-.81.17-1.61-.35-1.78-1.16l-5.3-11.74c-.17-.81,3.16-1.61,3.97-1.78l1.96-.41c.81-.17,1.61.35,1.78,1.16l2.18,10.27c.34,1.61-.7,3.21-2.31,3.56Z\" \/>\r\n                            <path class=\"thumb-down-cls-1 daexthefup-icon-primary-color\" d=\"m38.17,28h-18.67c-.83,0-1.5-.67-1.5-1.5v-12c0-.83.67-1.5,1.5-1.5h16.27c.71,0,1.33.5,1.47,1.21l2.4,12c.19.93-.53,1.8-1.47,1.8Z\" \/>\r\n                        <\/g>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefup-comment\">\r\n\t\t\t\t\t<div class=\"daexthefup-comment-top-container\">\r\n\t\t\t\t\t\t<label id=\"daexthefup-comment-label\" class=\"daexthefup-comment-label\"><\/label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"daexthefup-comment-character-counter-container\">\r\n\t\t\t\t\t\t\t\t<div id=\"daexthefup-comment-character-counter-number\"\r\n\t\t\t\t\t\t\t\t\tclass=\"daexthefup-comment-character-counter-number\"><\/div>\r\n\t\t\t\t\t\t\t\t<div class=\"daexthefup-comment-character-counter-text\"><\/div>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<textarea id=\"daexthefup-comment-textarea\" class=\"daexthefup-comment-textarea\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Type your message\"\r\n\t\t\t\t\t\t\t\tmaxlength=\"\r\n\t\t\t\t\t\t\t\t400\t\t\t\t\t\t\t\t\t\"><\/textarea>\r\n\t\t\t\t\t<div class=\"daexthefup-comment-buttons-container\">\r\n\t\t\t\t\t\t<button class=\"daexthefup-comment-submit daexthefup-button\">Submit<\/button>\r\n\t\t\t\t\t\t<button class=\"daexthefup-comment-cancel daexthefup-button\">Cancel<\/button>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefup-successful-submission-text\">Thanks for your feedback!<\/div>\r\n\r\n\t\t\t<\/div>\r\n\r\n\t\t\t","protected":false},"excerpt":{"rendered":"<p>Let us see what the Messaging Queue is: Messaging Queue (MQ), a message oriented middleware tool, has been an IBM product since 1992. It is very helpful to communicate messages (XML\/text file\/HTML file etc.) in SOA (service Oriented Architecture) on over 80 platforms. It is reliable and provides a secure, &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Test Application Messaging Queue\" class=\"read-more button\" href=\"https:\/\/www.softwaretestinghelp.com\/messaging-queue-mq-testing\/#more-8438\" aria-label=\"Read more about How to Test Application Messaging Queue\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":13319,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_helpful_pro_status":1,"footnotes":""},"categories":[567],"tags":[],"class_list":["post-8438","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qa-tools-reviews"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/posts\/8438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/comments?post=8438"}],"version-history":[{"count":0,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/posts\/8438\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/media\/13319"}],"wp:attachment":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/media?parent=8438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/categories?post=8438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/tags?post=8438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}