B2B (Business to Business) Gateway Testing Process

What is B2B Gateway? 

B2B stands for Business to Business Gateways. Companies interact and collaborate with each other for their business needs. To do so, they use messaging in the form of XML/cXML/EDI.

B2B Gateway is a communication layer between two trading partners and is always a two-way communication medium. It communicates messages within protected networks that use encryption/decryption technology while carrying the messages.

The B2B technology is widely used in supply chain and marketing domains among others. 

Today’s article is a brief discussion on testing the B2B communication messaging system.

B2B Gateway Testing

B2B communication System

 

Software tools like INOVIS, Babelway, e-Insight, Beacon EDI, etc. are few EDI (Electronic Data Interchange) tools used by companies to accomplish B2B solutions. Many domains like finance, marketing, sales, eCommerce, automobile, logistics and manufacturing use this technique for data exchange.

B2B Gateways Testing 1

Let’s look at an example.

Automobile companies manufacture vehicles and order parts like glass, tires, seat covers, electrical parts, fiber parts, aluminum parts, etc. from 3rd party vendors. To do this, the automobile company will send the list of parts in the form of messages (XML/cXML/EDI format) to the 3rd party vendor.

While transmitting the messages from one end to the other, the B2B Gateway will facilitate the transportation of the messages in a secure and reliable environment.

Also read => What is Integration Testing?

B2B Messaging Process

This section will deal with how exactly the messages in the B2B Gateway are being carried.

This is a simple example to explain how the business transactions between Company-A and Company-B is carried out.

Let’s assume there are two companies Company-A and Company-B. Company-A’s last layer of the application is PMAPL and the Company-B’s last layer is VAPL. The Company-A is the parent company who manufactures the automobile as a finished product. To order the raw materials the Company-A will contact the Company-B, the vendor who supplies the raw materials.

Now, once the business agreement completes between the two companies they start trading by communicating with each other. The Company-A will place an order with the help of internal application (or applications) and it flows through the system up until it reaches PMAPL application. The PMAPL application will prepare the final message (XML) to be sent to the vendor.

(Note: Click on the image for an enlarged view)

B2B Gateways messages over the Internet

The PMAPL application is the boundary layer for Company-A. Once the message passes from the PMAPL application, it will first reach the B2B Gateway application. The message received at the B2B Gateway should translate to a B2B gateway understandable format, which means the XML message structure/elements sent by the PMAPL application will change once the B2B Gateway receives the message.

The B2B gateway will interpret the message into its own desired structure.

The B2B Gateway then starts processing the message and if need be, it could encrypt the message. Once the encryption is done the B2B Gateway will transmit the message to the VAPL application at Company-B. Before receiving the message at VAPL application in Company-B, the B2B Gateway will decrypt the message to the XML format.

Now the B2B Gateway will transform the message into the vendor application’s preferred format. The vendor may also check the message for security and correctness of the message received.

Once all that is done, the vendor will accept the message and send an acknowledgment to PMAPL of Company-A. If any discrepancy is found, the vendor may reject the transaction with a failure message as a reply.

Additional info

The other technology involved in the transaction is the firewall that protects/restricts the unauthorized messaging. That’s why companies employ ERP Firewall solutions to examine all inbound and outbound message authentication. The Firewall will block all the unnecessary messages or documents that are not as per the rules or configuration.

ERP Firewall solutions

One more thing in B2B messaging is that it maintains EDI standards to communicate messages among the trading partners. The EDI standards help companies maintain the integrity of transmitting messages. You can go through the EDI standards in the web to get more information on it.

How to Test B2B messaging system?

The testing B2B messaging system for any application is a very critical feature – all messages should be checked for correctness, completeness, format and security, especially when testing starts at the vendor end.

Before starting testing, go through the message/data flow architecture of the system.

This includes understanding:

  • how the input xml is generated,
  • how to validate the xml,
  • how the transformation takes place while the message is sent to B2B Gateway,
  • how the B2B Gateway is sending the message to the vendor and
  • what form of the message the vendor is receiving.

You can usually find this information from the SA/BA/Design document. Make sure XML to XML mapping and XSD documents are fixed before you start testing.

------------

10-Step Process to Test B2B Gateways

Let’s take the example described above and here are the steps to test it.

Step #1:

Application PMAPL is generating the outgoing xml message1.

First, validate the xml message1 vs the input data with respect to mapping document and ensure the correctness of data values. Also validate the xml header, metadata, elements (with respect to XSD provided by SA).

B2B Gateways Testing 4

Step #2:

Now once the xml message1 is validated, then the PMAPL application will process the xml message1 and send it to the B2B Gateway application. Here the transformation happens and the new xml message2 is received at B2B Gateway application.

B2B Gateways Testing 5

Step #3:

Extract the xml message from the B2B Gateway application.

Here you will find that the values of the xml are same, but the xml header, metadata and some of the element name might be changed. This is because the message is meant to be in B2B Gateway preferred format.

Step #4:

Now start validating the xml message2 vs the xml message1 with respect to the mapping document and ensure the correctness of data values.

Sometimes the element datatype could also be changed, and while validating you will have to consider the scenario accordingly.

Step #5:

Also, you need to validate the xml header, metadata, elements (with respect to XSD provided by SA).

Tip: The easy way to validate the xml message is with the help of excel, you can drag and drop the xml message to excel sheets and compare the values for correctness and completeness.

Step #6:

The next level of transformation that happens is the encryption of the xml message2. This is done by the B2B Gateway application before it transmits the message to the vendor. (This encryption/decryption of the message is sometimes mandatory and sometimes not. It depends on the agreement between the trading partners on how to maintain the message format and data security.)

Step #7:

Once the encryption of xml message2 is done, the B2B Gateway transmits the xml message3 to the receiving end of the B2B gateway at the vendor site.

B2B Gateways Testing 6

Step #8:

B2B Gateway application will confirm that the xml message3 has been received at the vendor end.

Challenge: The tester might be restricted from this point beyond that the vendor site might be restricted for testing. In that case, we have wait for the positive or negative response to the message from the vendor. However, if the tester is working at the vendor site, then the tester has to perform similar steps as mentioned above.

Step #9:

Now the xml message3 will be decrypted by the B2B Gateway application and it would generate the xml message4. Then the VAPL application will transform the xml message4 to VAPL desired format to xml message5 for further processing.

B2B Gateways Testing 7

Step #10:

Then VAPL application will confirm with a positive/negative acknowledgment message back to PMAPL application through B2B Gateway application. Again the communication process is same as above procedure but in a reverse way.

Failure scenarios while testing

Let’s discuss some failure scenarios that we might encounter while testing, in the same above example.

  • PMAPL application’s processing of the xml message1 that may fail due to technical issues like fetching data, middleware call failures (Webservice, MQ message, API etc), code issue like DB values mismatch, etc. Root cause analysis is essential to find the actual cause. A tester’s familiarity with the application architecture can help a great deal.
  • While transmitting the xml message1, the transformation could be a failure due to incorrect xml format.
  • After transformation of xml message1, the B2B Gateway did not receive the message; this may be due to middleware failure between PMAPL and B2B Gateway.
  • Unable to produce the xml message2, due to improper format issue or incorrect XSD structure definition.
  • The xml message2 failure may persist in B2B Gateway application, due to Firewall issues. Here one thing to remember is that the Firewall issue can come up at any point of time with B2B Gateway application. So the Firewall support 24/7 team should always be present to address any Firewall failure issues happening. In general, the Firewall support team is owned by the individual trading company.
  • While encrypting the xml message2 in B2B Gateway application, the encryption might fail
  • Apart from these, there are many environment failures like server issues; Windows patch problems, configuration issues, server downtime, etc. These issues are to be addressed by the respective server/environment support teams.

Conclusion

We hope this article has presented an example based discussion on B2B, its testing techniques, and challenges. The B2B testing needs multi-level application support to be successful and involves well-coordinated team effort to drive it to fruition.

About the Author: This is a guest article by Asish K Mallik having 7+ years of ERP system testing experience.

Please share your comments, questions, and experiences with us below.

Recommended reading

4 comments ↓

#1 MuhhamadK

nice tutorial. b2b gateways are every important part for application integration and should be tested thoroughly.

#2 Thelma F

Thanks Asish
You did a good job by explaining the tutorial in an easy format to understand.

Thank you

#3 Alok Urs

very nice explaination in simple format and clarity is utmostly shown

well done article

#4 umar

Very nice article and doing a great job really!
Can you share an article on “QA vs QC life cycle” ?

Thank You

Leave a Comment