This post was most recently updated on June 17th, 2019
Why Front-end application testers should also know the basic Database testing in order to better test the applications:-
What is Database Testing
In Database testing we validate:-
- Exactly the same data that is in database is retrieved by web or desktop application (front-end applications).
- The data which is inserted/modified from front-end application the same should be stored in the database.
- In other words it is the integrity between the data on displayed on UI and the data in the Database.
Why it is Important
- When a tester goes through the database design documents, the tables & joins, the dataflow, the data types impart more knowledge to the testers there by more test scenarios and by which better testing of the application is done.
- The bugs which are difficult to find in front-end testing can only be found by database testing.
- Some conditions which you cannot test by front end application can be tested easily using database.
What to Test in a Database
- The data types of each individual table columns should be as per database design document.
- The table columns should be pointing to the right field in the front end application.
- Test the data retrieval, data insertion, data updating & data deletion either from the front end or using database queries.
- The whole content you will check in Data migration.
How to Test Database
- Database testing is one of the major testing which requires knowledge of SQL.
- Databases used can be SQL, Oracle, DB2, etc.
- Tester should understand database and tables used by going through the Database design document.
- Prepare select queries to verify impact of front-end action on the back-end.
- You can use insert/update/delete queries to insert, update and delete a record according to your requirement and check it in the front-end vice versa.
- Manual testers can run the select queries to verify correct results are displaying in database after operating in the front-end.
Frequently usable SQL statements for Front end application tester are mentioned below:-
Data Manipulation Language (DML): Used to retrieve, store, modify, delete, insert, and update data in the database. Examples: SELECT, UPDATE and INSERT statements.
Inner Join: Retrieves the matched records from both tables.
Distinct: Retrieves the different values from one or more fields.
In: This operator is used to find the value is within the list or not.
Between: This operator is used to retrieve the values with in a range.
Like: This operator is used perform pattern matching using wildcards; it is used in the where clause.
Order By Clause: Sorts the table records in ascending or descending order. Default order is ascending.
Group By: Use Group By statements with the aggregate function to group the result set with one or more columns.
Aggregate Functions: Performs a calculation on a set of values and return a single value. Example: Avg, Min, Max, Sum, count etc.
For more information on SQL you can go through this link