How to do Backend Testing?

In today’s class, we are going to learn about What is backend testing and how to perform such testing.

Almost every software application retrieves or stores data at backend which could be a server or database or both. Software application could store data as files on server or store data in a tabular manner into RDBMS (Relational Database Management System) database. The backend database could be SQL Server, MySQL, Oracle, Sybase, DB2, etc. which are capable to store data and organize data in the tables as records. Alternatively, there are databases such as MongoDB where data are stored as documents instead of the tabular organization. Irrespective of database organization, all database backend testing includes the validation of the following items.

  • Data validity
  • Data integrity testing
  • Performance check
  • Stored procedures testing
  • Triggers
  • Functions testing
  • Sequences testing
  • Schema
  • Database tables and associated Columns, Keys and Indexes
  • Database server validations
  • Validating data duplication

 

Explanation with an example:

Let’s us consider an example of a website where movie tickets are booked for a theatre. Website users create their profile and use various online payment methods to book movie tickets on daily basis. As a part of backend testing for such website, the backend testers should test the following aspects for backend or database testing by performing following tests.

 

Backend Testing

 

  • All the information captured from the profile creation form on the screen such as name, address, payment method, credit card or bank details, etc. should be captured and persisted well in the designated database table without any error and none of the fields in the table should be missed while capturing the user profile details.
  • The details stored in the database table should be able to retrieve from the database and visible to the user who is requesting the information with the correct information.
  • The stored information should be persistent, and available on-demand basis.
  • The user should able to book tickets using the store credit card details or bank information such that the ticket booking should take place as a transaction. Transaction obeys ACID properties. The term ACID stands for Atomicity, Consistency, Isolation, and Durability. In other words, it means that the ticket should be booked only if it is available in the system, bank details are valid with ample money in it to purchase the ticket, and the user has logged into the system with authenticated details. After all these conditions are met, a user can book tickets from the system and all the changes across the database are persistent and will never be lost by any means. This is a very important aspect of backend testing.
  • The incomplete transaction which does not obey ACID property should be immediately aborted by the system and all transactions details should be rolled back after logging the transaction failed details in the system logs.
  • The only authenticated user can login into the ticket booking website. This could be made possible after authentication through backend database.
  • The system should not reveal any piece of information to an unauthenticated user of the system.

 

Backend Testing vs GUI testing:

Backend testing is entirely different from GUI testing. In backend testing, the primary focus is to study the behavior of the system at the database level. Below is the comparison between backend and GUI testing which will help us to understand backend and how it is different from GUI testing.

Property Backend Testing GUI Testing
Testing Overview Backend testing or Database testing emphasizes data validation as well as integrity testing. GUI testing is primarily on the look and feel the side of the application UI (user interface). It is also known as front-end testing or Application testing.
Testing procedures Database testers primarily focus on testing of back-end components which are usually not visible to the application users. It involves testing of various database components present in a relational database such as Oracle, DB2, My SQL, SQL Server, Sybase, etc. GUI testers primarily focus on testing functionalities of a software application and associated components such as forms, graphs, menus, reports, etc. These front-end components are developed in various programming languages such as JAVA/J2EE, PHP, VB.net, C#, Delphi, etc.
Validation mechanism Backend testing or database testing involves validation of various items. They are data validity, data integrity testing, performance check, Stored procedures testing, Triggers, Functions testing, Sequences testing, Schema, Database tables and associated Columns, Keys and Indexes, Database server validations and Validating data duplication GUI testing involves validation of various items. They are the behaviour of an application, buttons on a page, forms and fields on a page, calendar and images (look and feel), navigation from one page to another page, and the overall application functionality which is visible to the end user.
Testing knowledge required Backend tester requires a good knowledge of database concepts such as normalization, SQL queries to interact with procedures and functions, views, indexes, keys, tables, etc. in order to perform DB testing. GUI or front-end testers requires a good knowledge of business requirements, application behavioral knowledge, reading application logs, etc. in order to perform GUI testing.
The data source for testing Database captures heterogeneous data for testing from multiple sources such as data over web applications, Intranet applications, user interactions. Etc. Data under test for GUI testing is entered manually into the applications. Based on this test data functional testing for application is performed.

 

 

Database Testing Tools:

Backend testing can be conducted by using these following tools.

  • Data Factory
  • Data Generator
  • Test Data Generator
  • AETG
  • TurboData

 

Pros of Backend Testing:

  • Backend testing is way ahead of black-box testing and testing is actually focused at data and its organization level into the database.
  • It is an in-depth testing which can ensure maximum test coverage.
  • It can help to uncover many defects in the early testing phase.

 

Cons of Backend Testing:

  • Manual tester requires SQL knowledge in order to interact with database components such as views, tables, triggers, stored procedures, functions, etc.
  • It may incur an additional testing cost to the organization.

 

Database Testing Types:

Database testing can be of the following types.

  • Structural Testing: This backend testing is primarily focussed on the validation of the proposed database structure for an application in terms of tables, views, stored procedures, functions, triggers, etc.
  • Functional or behavioral Testing: It is associated with the application behavior from the back end point of view. E.g., if a user fills up the form from the front end which all tables and associated columns are going to get impacted.
  • Non-Functional Testing: It is associated with the database performance under load and stress condition on an application.

 

Conclusion:

Backend testing is always an asset to an organization due to its in-depth testing approach and maximum test coverage scope. It adds lots to value to an organization in terms of software quality.

If you are not a regular reader of this website then highly recommends you Sign up for our free email newsletter!! Sign up just providing your email address below:

Enter your email address:

Check email in your inbox for confirmation to get latest updates Software Testing for free.

Happy Testing!!!

Leave a Comment

Share This Post