B2B (Business to Business) Gateway Testing Process

By Vijay

By Vijay

I'm Vijay, and I've been working on this blog for the past 20+ years! I’ve been in the IT industry for more than 20 years now. I completed my graduation in B.E. Computer Science from a reputed Pune university and then started my career in…

Learn about our editorial policies.
Updated March 7, 2024

Understand everything in detail about B2B Gateway Systems in this article:

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.

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 Systems

B2B Gateway Testing

B2B communication System

Software tools like INOVIS, Babelway, e-Insight, Beacon EDI, etc. are a 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, tyres, seat covers, electrical parts, fiber parts, aluminium 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 exactly how 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 are 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. 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 is complete between the two companies, they start trading by communicating with each other. Company-A will place an order with the help of internal applications (or applications) and it will flow 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 can 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.

The B2B Gateway will now 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 failed 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 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. EDI standards help companies maintain the integrity of transmitting messages. You can go through the EDI standards on the web to get more information on it.

How to Test a B2B Messaging System

Testing the 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’s end.

Before we start 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 when the message is sent to B2B Gateway,
  • how the B2B Gateway is sending the message to the vendor and
  • what form of message is the vendor receiving?

You can usually find this information in 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

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, 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 on the 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 the 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 the 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 can 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 easiest 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)

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

Challenge: The tester might be restricted from this point beyond the vendor site might be restricted for testing. In this case, we have to 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 will generate the xml message4. The VAPL application will then transform the xml message4 to VAPL desired format to xml message5 for further processing.

B2B Gateways Testing 7

Step #10)

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

Failed 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 issues 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 the 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 the B2B Gateway application due to Firewall issues. One thing to remember here is that the Firewall issue can come up at any point in time with the B2B Gateway application. 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 an individual trading company.
  • While encrypting the xml message2 in the B2B Gateway application, the encryption might fail
  • Apart from these, there are many environmental 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 a good example based discussion on B2B, its testing techniques, and challenges. B2B testing requires multi-level application support to be successful and involves well-coordinated team efforts 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.

We hope this article was useful to you. Please share your comments, questions, and experiences with us in the comment section below. We would love to hear from you.

Was this helpful?

Thanks for your feedback!

Recommended Reading

5 thoughts on “B2B (Business to Business) Gateway Testing Process”

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

    Reply

Leave a Comment