Skip to content

Iptv Assist

Learn More from us

Menu
  • HOW TO
  • Firestick
  • Chromecast
  • PC Apps
  • Lg Smart TV
  • IPTV Services
  • Automation Testing
  • Smart TV
  • Software Testing Tools
  • Contact Us
Menu

Database CRUD Testing Through UI with Sample Test Cases

Posted on March 26, 2023

Best Iptv Service Provider 2023 With 40k+ Channels And 100k+ VOD . 24/7 Suppport . Paypal Supported

What are CRUD Operations and How to Perform CRUD Testing Through UI:

Best Iptv Service Provider 2023 With 40k+ Channels And 150k+ VOD . Hurry Up

Human beings started storing information even before several decades! And in those days, Flat file databases were used in the computing history where all the data was stored in a file.

Recommended IPTV Service Providers

  1. IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
  2. IPTVRESALE – Rating 5/5 ( 200+ Reviews )
  3. IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
  4. IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
  5. IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
  6. IPTVTOPS – Rating 5/5 ( 43 Reviews )

 

Later, in early 1970’s IBM developed the first Relational Database Model, which introduced “indexes” to easily fetch the data.

Database CRUD Testing

What You Will Learn:

  • CRUD Operations Overview
  • Why is Database Testing Important?
  • The 4 Basic Database Functionalities
  • Definition of CRUD
  • CRUD Testing
  • How to Test CRUD Functionality of a Software?
    • #1) CREATE Functionality
    • #2) READ Functionality
    • #3) UPDATE Functionality
    • #4) DELETE Functionality
  • Conclusion

CRUD Operations Overview

Currently, the most common data storage system is the Database where the software creates, reads, updates and deletes the data through Queries. Computer Software can respond to the user requirements in a faster and effective manner through properly designed database and queries.

This implies that testing and verification of database is a much important factor.

Database CRUD

Graphical User Interface (GUI) responses like error messages, success messages etc. are considered to be very important by almost all the test managers. This is because, GUI happens to be the visible part of an application, which the users can see. However, Database testing is equally important an one.

Out of my experience, I have seen many manual testers who consider this as a tedious job, but that is actually not.

In this tutorial, we will discuss black box database functionality testing through User Interface and MySQL queries in a simple manner with easy examples.

Why is Database Testing Important?

The points given below will explain the importance of Database testing in a much brief way.

  • Data is an important asset and it needs to be saved and protected.
  • Databases are getting complex with new technologies and platforms. Therefore, chances of bugs increase.
  • There can be critical functionalities associated with the values stored in the database.
  • Problems in Database or queries can lead to major functionality issues.
  • To ensure Data is mapped properly or not.

Database testing can be done as a unit test, black box test, white box test and grey box text.

The 4 Basic Database Functionalities

Database based software generally have four major functionalities which will be clear from the examples below.

Example 1:

Facebook, the most famous social networking website.

Database Testing- fb

  • You can create a new account
  • View your account details
  • Edit account details
  • Delete the account
  • You can create comments
  • View them
  • Edit them
  • Delete them

Example 2: 

LinkedIn, the famous Job Search website:

Linked in

  • You can create your profile
  • View it
  • Edit it
  • Delete it
  • You can add posts
  • View them
  • Edit them
  • Delete them

Did you notice a set of common activities here?

Yes! You are right.

Most of the software support these functionalities of creating, viewing, editing and deleting from where the term CRUD comes.

Definition of CRUD

In computer programming, CRUD stands for Create, Read, Update and Delete. These are the four major and basic functions of persistent storage. These are often done in software applications through forms.

  • Create – INSERT an entry in Database.
  • Read or Retrieve – SELECT the entry from the Database and View it.
  • Update – UPDATE the entry completely or partially.
  • Delete or Destroy – DROP/DELETE the entry.

Based on the software requirements, the CRUD cycles can vary.

For Example: sometimes, salesperson creates an account and the user views it. The user might not have the privilege to edit or delete it. On the other hand, the requirement could be: the user creates his account and the salesperson verifies and approves it. These cycles are very important from a tester’s point of view.

For the functionalities discussed above, there is a corresponding query running in the database.

Given below are Examples of MYSQL queries for each action

Action Sample Query
CREATE INSERT INTO table_name (column1, column2, column3, …)
VALUES (value1, value2, value3, …);
READ SELECT * from table;
UPDATE UPDATE table_name
SET column1 = value11, column2 = value22
WHERE condition;
DELETE DELETE FROM TABLE table_name where column1 = ‘value11’;

Three variations of CRUD are BREAD (Browse, Read, Edit, Add, Delete), DAVE (Delete, Add, View, Edit) and CRAP (Create, Replicate, Append, Process).

CRUD Testing

CRUD testing is a black box testing of the database functionality.

As we know, Black box testing considers the test software system as a “black-box and the tests are conducted through the UI.

We understood that every front-end action like account registration, editing personal details, viewing details, deleting account etc. has a corresponding CRUD action in the database. CRUD testing is done to check if these actions reflect in the Database properly or not.

CRUD testing is different from common black box front-end testing where we check for success messages like “Account successfully created” after a user Registration etc. Here we have to check if the account details are actually getting entered into the Database or not.

There are two ways in which a manual tester can do this:

#1) Execute queries on our own – Testers with a good understanding of SQL language and software requirement can make their own queries to test the database. This way all the possible cases can be verified with good queries.

#2) Execute queries with the help of a developer – Testers can begin with verifying the user interface of the application and get queries from the developer.

The following questions should be considered while writing test cases for CRUD operations:

  • What kind of CRUD action is valid and what is invalid for a test application?
  • What kind of relation does/should the CRUD actions have with each other?
  • When are the CRUD actions executed?
  • Who is accessing the CRUD functionality? Does the system set different privileges for different users?

The general test process for DB testing is not very different from usual manual black box GUI testing.

Like,

Step 1: Prepare the test environment.

Step 2: Execute the test steps.

Step 3: Check the test result.

Step 4: Validate actual results according to the expected results.

Step 5: Report bugs and other findings.

In order to check the test result, GUI response and Query result are used. For CRUD black box testing, we just need a query, which is SELECT.

As we all know, databases store data. When we need to retrieve the data, the SELECT query is used. In black box testing, we just have to use this query to see if the actions through UI show proper reflections in the database or not.

‘SELECT’ can be used in the following ways:

#1) If a tester wants to check and verify all the data, he can use the start symbol (*) in SELECT query. This is the simplest form of SELECT query.

SELECT * FROM table_name;

The above statement selects all the fields from all the rows from the table_name table.

#2) In some cases, the first query result can be messy. If a tester is interested only in some fields only, then the following script can be used.

 SELECT ‘field_1’, ‘field_2’, ‘field_3’ FROM table_name;

The above statement selects the fields, ‘field_1’, ‘field_2’ and ‘field_3’ from all the rows from the table_name table.

#3) If a tester wants to see the results based on any criteria, then WHERE clause can be used.

SELECT ‘field_1’ FROM table_name WHERE field_2 = ‘success’;

The above statement selects the field, ‘field_1’from all the rows from the table_name table, where ‘field2’ is ‘success’.

How to Test CRUD Functionality of a Software?

Consider the following Example of a User Interface, which allows certain user privileges for using MySQL Database to store the data.

EXAMPLE DATABASE DETAILS
1. Can CREATE a product with all details including, product name, product description, product price using ‘Product Add’ form Database : Shopping_DB
Table: product
Fields: product_name, product_details, product_price

Creates a row in the table ‘product’ with details added in corresponding fields

2. Can READ the details product name, product description, product price in ‘Product details page’. Database : Shopping_DB
Table: product
Fields: product_name, product_details, product_price

Selects all data or select a particular data from the table ‘products’

3. Can UPDATE the product name, product description, product price using ‘Product Edit’ form. Database : Shopping_DB
Table: product
Fields: product_name, product_details, product_price

Update all details or particular details in a particular row in the table ‘products’

4. Can DELETE the product Database : Shopping_DB
Table: product
Fields: product_name, product_details, product_price

Delete all details in ‘products’ table by dropping the table or delete a particular row from it.

Let’s check how CRUD functionality can be checked for this case.

Note: Always conduct CRUD testing in the database dumps because this testing can cause changes in the database. The command below can be used to take a dump of the entire database.

$ mysqldump -u [uname] -p [pass] Shopping_DB > Shopping_DB_backup.sql

#1) CREATE Functionality

Adding a new product item, the following steps can be followed:

  1. Load ‘Product Add’ form.
  2. Enter the product name, say ‘test name’.
  3. Enter product description, say ‘this is test product detail’.
  4. Enter product price, say ‘100’.
  5. Submit the form.

Checking the result:

  • Tester manually verifies if the product is displayed with all the details in the front end of the software application.
  • Tester executes the query in MYSQL database server to check if the particular row is present

Query:

SELECT * FROM products WHERE product_name = ‘test name’;

Query Result from MySQL:

A row with the corresponding details should be displayed like,

mysql> SELECT * FROM products WHERE product_name = ‘test name’;
+————-+—————————–+—————–+
|product_name | product_details | product_price |
+————-+—————————–+—————–+
| test name | this is test product details| 100 |

Other cases to consider:

  1. For some systems, different users will have different privileges. In that case, testers might have to check the response for each user roles.
  2. If duplicate products are not allowed, a tester can check that by adding a product with the same details once again. This time the database should not have a second entry corresponding to the same product.
  3. If the software allows multiple product creations at a time, then the tester can check if all the details of all products in the submission were entered into the database properly or not.
  4. Try different input combinations.
  5. Check what happens during server downtime.

#2) READ Functionality

To check if the created entry is readable, the following steps can be followed:

  1. Create some products with different input combinations through CREATE functionality, say test name 1, test name 2, test name 3.
  2. Try searching for the products.

Checking the result:

  • Tester manually verifies if the product details are correct.
  • Tester compares the details with the ones saved in the database.

Query:

SELECT * FROM products WHERE product_name = ‘test name 1’ OR product_name = ‘test name 12’ OR product_name = ‘test name 3’;

Query Result from MySQL:

The details of the selected products must be displayed. The tester can verify and compare this with the results in UI.

mysql> SELECT * FROM products WHERE product_name = ‘test name 1’ OR product_name = ‘test name 12’ OR product_name = ‘test name 3’;
+————-+—————————–+—————–+
|product_name | product_details | product_price |
+————-+—————————–+—————–+
| test name 1 | this is test product detail1| 100 |
| test name 2 | this is test product detail2| 100 |
| test name 3 | this is test product detail3| 100 |

Other cases to consider:

  1. View items one at a time.
  2. View multiple items at a time.
  3. Trying to view an item that doesn’t exist.
  4. Try searching with different conditions.
  5. Try checking the functionality for different user roles.
  6. Check what happens during server downtime.

#3) UPDATE Functionality

To edit or update existing entries, following steps can be followed:

  1. Create a product using CREATE functionality.
  2. Edit different fields of the product, say ‘test name’ to ‘V Neck Top’.
  3. Submit

Checking the result:

  • Tester manually verifies that the product details have changed
  • Tester executes MYSQL query and sees the details

Query:

SELECT * FROM products WHERE product_name = ‘V Neck Top’;

Query Result from MySQL:

A row with corresponding details should be displayed.

mysql> SELECT * FROM products WHERE product_name = ‘V Neck Top’;
+————-+—————————–+—————–+
|product_name | product_details | product_price |
+————-+—————————–+—————–+
| V Neck Top | this is test product details| 100 |
+————-+—————————–+—————–+

If you search with an old product name, the database shouldn’t return the details.

Other cases to consider:

  1. Update multiple items at a time.
  2. Update to a key value that already exists.
  3. Update all the details or partial details.
  4. Update the fields with different input combinations.
  5. Check the updated feature for different Privileges.
  6. Check what happens during server downtimes.

#4) DELETE Functionality

To check the delete functionality, following steps can be followed:

  1. Create a product with CREATE functionality.
  2. Delete the product.

Checking the result:

  • Tester manually checks if the product is removed from the UI
  • Tester manually checks the MySQL database and confirms that the corresponding row has been deleted.

Query:

SELECT * FROM products WHERE product_name = ‘test name’;

Query Result from MySQL:

This should display the query result as shown below.

mysql>SELECT * FROM products WHERE product_name = ‘test name’;
Empty set (0.00 sec)

Other cases to consider:

  1. Delete multiple items in a single request.
  2. Delete an updated item.
  3. Take two tabs and try to give delete request for a product from both tabs altogether.

Conclusion

Database testing is very important as it confirms security and reliability of a software application. Most software applications deal with creating, reading, and updating and deleting data to/from the database. According to software requirement, CRUD cycles can vary. A tester should plan test cases based on CRUD cycle.

CRUD functionalities can be tested manually and verified from the User interface and Database. The SELECT query can be used to verify the changes in the database corresponding to each CRUD operation.

Are you an expert in CRUD testing? Do you have any interesting facts to share with our readers who are new to CRUD? Feel free to express your thoughts/suggestions in the comments section below!!

Related

Best Iptv Service Provider 2023 With 40k+ Channels And 150k+ VOD . Hurry Up

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • IPTV List: Best iptv lista 2023
  • IPTV Premium: Best Premium IPTV Service Provider List And Benefits
  • Nikon IPTV Review: Over 10,000 Live Channels for $12/Month
  • Iptvwings. Com Review: +18000 Live IPTV Channels ,+70000 Movies, +40000 TV show For $15/1 month
  • IPTVUNO Review: More Than 16000 Live TV channels, 55,000 Movies & VOD For $15/Month

Recent Comments

  1. IPTV List: Play lista iptv 2022 - Iptv Assist on Best IPTV Player in 2023 for Watching Live TV
  2. Cola IPTV – Over 18,000 Live Channels for $12/Month - Iptv Assist on FileLinked – How to Install on Firestick/Fire TV and Android Devices
  3. Cola IPTV – Over 18,000 Live Channels for $12/Month - Iptv Assist on 50+ Best IPTV Service Providers for Streaming Live TV 2023
  4. XoomsTV IPTV – Over 11,000 Channels & VOD for Under $13/Month on Best VPN for IPTV in 2023 and How to Install on Firestick/Android
  5. Voodoo Streams IPTV Review – Over 12,000 Channels for $11/Month - Iptv Assist on Dynasty TV IPTV Review – Over 6,000 Channels for $10/Month

Archives

  • March 2023

Categories

  • Activate
  • Agile Testing
  • Alternatives
  • Android
  • APK
  • Apple TV
  • Automation Testing
  • Basics of Software Testing
  • Best Apps
  • Breakfast Hours
  • Bug Defect tracking
  • Career in Software Testing
  • Chromebook
  • Chromecast
  • Cross Platform
  • Database Testing
  • Delete Account
  • Discord
  • Error Code
  • Firestick
  • Gaming
  • General
  • Google TV
  • Hisense Smart TV
  • HOW TO
  • Interview Questions
  • iPhone
  • IPTV
  • IPTV Apps
  • Iptv Service SP
  • IPTV Services
  • JVC Smart TV
  • Kodi
  • Lg Smart TV
  • Manual Testing
  • MI TV
  • Mobile Testing
  • Mod APK
  • newestiptv.com
  • News
  • Nintendo Switch
  • Panasonic Smart TV
  • PC Apps
  • Performance Testing
  • Philips Smart TV
  • PS4
  • PS5
  • Python
  • QA Certifications
  • QA Leadership
  • QA Team Skills
  • Quality Assurance
  • Reddit
  • Reviews
  • Roku
  • Samsung Smart TV
  • Screenshot
  • Selenium Tutorials
  • Sharp Smart TV
  • Skyworth Smart TV
  • Smart TV
  • Soft Skills For Testers
  • Software Testing Templates
  • Software Testing Tools
  • Software Testing Training
  • Sony Smart TV
  • Sports
  • Streaming Apps
  • Streaming Devices
  • Tech News
  • Test Management Tools
  • Test Strategy
  • Testing Best Practices
  • Testing Concepts
  • Testing Methodologies
  • Testing News
  • Testing Skill Improvement
  • Testing Tips and Resources
  • Toshiba Smart TV
  • Tutorials
  • Twitch
  • Types of Testing
  • Uncategorized
  • Vizio Smart TV
  • VPN
  • Web Testing
  • What is
  • Xbox
©2023 Iptv Assist | Design: Newspaperly WordPress Theme