Data Integrity testing is a process in which data in the database is validated for its accuracy, completeness, and compliance with client requirements. Also used to validate if data is not modified, corrupted unexpectedly while accessing the database. Data integrity testing tests are executed regularly to check the changes in the database (expect to be unchanged) and also search for new errors caused due to changes in the database.
Characteristics of data integrity testing:
- Check the Data compatibility with older version of OS.
- It checks while verifying data in data tables, if they are altered.
- It checks if all the data is stores in the database in appropriate location and format.
- It includes execution of all data files to test clip art, standard formats of documents.
- Also helps in analysing blank value or default value whether it can be retrieved from database or not.
How test Data Integrity?
Data integrity will be examined using the tests:
- Check whether we can add, delete, modify any data in the tables.
- To check whether a blank or default value can be retrieved from database.
- Verify if the software displays right set of values.
- To check when the set of data is saved successfully in database, transaction must occur.
- To check the compatibility of different versions of OS, old hardware, interfaces with other software.
- To check whether default value assigned when user input is given.
Types of Data integrity testing:
There are three types of data integrity tests:
- Entity integrity
It examines carefully that each row of a table consists of a non-null primary key where each should be specific. Here we test with duplicate data and also with null data values.
- Domain Integrity
It checks that each set of data values. Column falls with specific permissible range. Testing may be achieved using different sets of data values: null, default, and invalid values.
- Referential integrity
Test the relations between the tables in the database: primary key and freight key, parent and child tables, etc.
Tosca DI – An example of a tool to test data integrity:
Data integrity consists of large volumes of data semi-structured and files and aggregated data for validation and row by row comparison. Tosca DI is built-in executer with in-memory caching to cope with all these types of tests and data.
The Tosca DI executer uses the memory caching database to temporarily store data while execution. At the end of the execution, the data is flushed. This in-memory database is used in three main use cases, testing large volumes, for example, terabytes of data. Data is paged in and out of memory as needed to optimize performance.
To normalize the semi-structured and message data like loading up XML and JSON files, aggregating multiple data sources including files and databases into a single source for further testing.
Once the data will be loaded into the caching database it can then be used for validations and row by row comparisons.
The Tosca DI executer has started in two ways, suppose if we run any data integrity test which requires loading data into the caching database the system will automatically start DI executer, which will be seen in the system tray.
We can also manually launch the Tosca DI Executer by double-clicking on this, Tricentis data integrity executer windows dot exe file which is located in the default Tosca installation.