Data Flow Testing In Software Testing Pdf

  1. Data Flow Testing In Software Testing

Most applications exchange data with each other. These communications may be in the form of XML messages that contain data. Also this data is being stored in a database system and when required the data is fetched by the applications.Also read =Most domains such as finance, marketing, sales, eCommerce, automobile, logistics and manufacturing use this technique for data communication with applications.To make the XML to Database testing successful, the most crucial input is the mapping document that defines each element in the XML versus the columns in the database.The mapping document will provide a complete representation of the elements (XML) to the columns (DB) association. The XML element values can be an input to DB tables or vice versa.With this article, you will have a good understanding of how to test XML message data to the Database data for data accuracy. What You Will Learn:.Let's talk about XML and Database:Applications use different techniques to communicate with one other.

Message communication using XML is one of them. XML is a reliable technique to communicate messages (Data) between two applications. XML contains set of elements that have specific values. Sometimes the values may be NULL or blank.Database stores data in the form of tables. A database contains several tables.

An application can feed data into the table in a database and also the table data can be fetched by applications when required.Now applications can store/fetch data from database tables in form of XML, and it is quite a reliable/flexible technique to do so. The XSD file looks like XML and it defines the structure of XML, like element name, element type, minOccurs, maxOccurs, etc.

Data flow testing in software testing with example

Data Flow Testing In Software Testing

Once the XML validation is done, export it to excel. Just drag the xml file to a new excel sheet.

Testing

It will give you a popup asking how you want to open the file, just select ‘As an XML table’. The data will save into the excel file as table.You can see data populated into the table, query the table with the particular data and fetch the record. Copy the data to the same excel file to another sheet. Now using EXACT function in excel you can easily compare the XML data vs DB data. Make sure you will compare only data not the column names.In this way you can compare multiple record data and can save a lot of manual effort for comparing XML element data values vs DB column data values.Find the below snap for reference:Note: In the above image you can see the column names did not match as we discussed before.Tip: Sometimes you may face a problem while comparing large size XML vs DB.

In that case, the only thing that you need to manage is arranging the column values in the excel sheet. Remember one thing: Excel file comparison should be limited to 100MB file size. You will encounter performance issues if you go beyond.As we discussed before, the XML element values can be an input to DB tables or vice versa.

So once you will get the XML message as inbound file to an application from a DB application, you need to perform the above testing technique to compare data values of XML vs DB. Sometime we need to perform E2E testing where multiple applications are processing the data. Real life example:A user has ordered a book from Flipkart, an e-commerce site. Starting point is the user ordering an item and the end point is at receiving Invoice copy at e-commerce center. Thereafter some scenarios such as return of order or exchange of order, payment return and so on, could occur.Here multiple modules like sales, inventory, item processing, logistics, payment, returns, offers, etc are involved to process an order till the item reaches the customer. The E2E flow is communicating messages to fulfill the order.As a tester when you will engage in the E2E testing, you may need to come across the scenarios where you will validate Application vs DB or DB to DB or Application to Application data. Here you should have a complete clarity on E2E data flow i.e.

What is data flow testing in software testing

What should be the data received by an application or sent by the application and what is the data being stored in DB or fetched from DB. Failure scenarios:Let’s discuss about some possible failure scenarios. One simple failure scenario is incorrect mapping. The mapping between the XML elements vs DB columns should be analyzed during the analysis or planning phase by a tester. Discuss all the mapping concerns with BA/SA to clarify doubts.

Once the mapping is frozen, you can ensure that the XML elements vs DB columns values would match. Compare the values and if it does not match, log a defect to address the issue. There are number of possibilities for the defect raised, like Data defect – May be the test data issue; Code defect – May be the bug in the code which parses the data values to not map; Artifact defect – May be incorrect mapping provided by BA/SA. XML format issue – XML header or metadata or some incorrect xml tags. In this case the XML itself failed to store the data values into the database table.

Datatype mismatch – Element value in the XML is having more char in length which is more than the DB column can accept.