B2B Gateway Testing Process

Share This Post

What is a B2B Gateway?

B2B Gateways use messaging in the form of XML/cXML/EDI. B2B Gateway is a communication layer between trading partners and is always a two-way communication medium. It sends 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.

Software tools like INOVIS, Babelway, e-Insight, and Beacon EDI are an example of EDI (Electronic Data Interchange) tools used by companies to provide B2B solutions. Many domains like finance, marketing, sales, eCommerce, manufacturing and logistics use this technology for data exchange.

For example, automobile companies manufacture vehicles. They order parts like glass, seat covers, electrical parts, fibre parts and headlights from third party vendors. The automobile company sends its order to suppliers in the form of messages (XML/cXML/EDI).

While transmitting the messages, the B2B Gateway will facilitate the transportation of the messages in a secure and reliable environment.

B2B Messaging Process

This is an example of how 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, Company-A will contact Company-B, the vendor who supplies the raw materials.

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

The PMAPL application is the boundary layer for Company-A. Once the message passes from the PMAPL application, it will first go to 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 a programmed structure. The B2B Gateway then starts processing the message and if need be, encrypts 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 can 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 acknowledgement 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 unauthorized messaging. That’s why companies employ ERP firewall solutions to examine inbound and outbound message authentication. The firewall is meant to block any unnecessary messages or documents that do not conform to the rules or configuration.

B2B messaging maintains EDI standards to communicate messages among trading partners. The EDI standards help companies maintain the integrity of transmitting messages. You can read the EDI standards for more information on it.

How do you Test your B2B messaging system?

Testing your B2B messaging system is critical. 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
  • 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

Here are the steps to testing.

Step #1:

Application PMAPL is generating the outgoing XML message1.

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

Step #2:

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.

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 concerning the mapping document and ensure the correctness of data values.

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

Step #5:

You also need to validate the XML header, metadata, elements (concerning XSD provided by SA).

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. It depends on the agreement between the trading partners.)

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.

Step #8:

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

The tester might be restricted from this point. Beyond that, the vendor site might be restricted for testing. In that case, we have to wait for a 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.

Step #10:

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

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), 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 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 the B2B Gateway application. So the Firewall support 24/7 team should be available to address any Firewall failure issues. 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.

The B2B testing needs multi-level application support to be successful and involves a well-coordinated team effort to make it successful.

More To Explore