๐Test Cases
Manual Test Case
TC-001
Verify data integrity
1. Retrieve a record from the database. 2. Modify a value in the record. 3. Update the record in the database. 4. Retrieve the updated record from the database.
The modified value should be reflected in the updated record.
TC-002
Verify data validation
1. Attempt to insert a record with invalid data into the database. 2. Attempt to update a record with invalid data in the database.
The database should reject the invalid data and return an error message.
TC-003
Verify data security
1. Attempt to access the database without proper authentication. 2. Attempt to access a record in the database that the user does not have permission to access.
The database should deny access and return an error message.
TC-004
Verify performance
1. Insert a large number of records into the database. 2. Retrieve a large number of records from the database. 3. Update a large number of records in the database. 4. Delete a large number of records from the database.
The database should be able to handle the operations within an acceptable timeframe without slowing down or crashing.
Scenario:
You are a database administrator for a company that sells products online. You have a database that contains information about products, customers, orders, and shipments. Your goal is to ensure that the database is reliable, efficient, and secure.
Test Cases:
Verify that a new record can be added to the database.
This tests whether the database can successfully add new data.
Add a new product to the database.
Verify that a record can be updated in the database.
This tests whether the database can successfully modify existing data.
Update the price of a product in the database.
Verify that a record can be deleted from the database.
This tests whether the database can successfully remove data.
Delete a customer record from the database.
Verify that a record can be retrieved from the database.
This tests whether the database can successfully retrieve data.
Retrieve the order history for a specific customer.
Verify that a table can be created in the database.
This tests whether the database can successfully create a new table.
Create a new table to track product reviews.
Verify that a table can be dropped from the database.
This tests whether the database can successfully delete a table.
Drop the table that tracks abandoned shopping carts.
Verify that a unique constraint can be added to a table.
This tests whether the database can successfully enforce uniqueness on a column.
Add a unique constraint to the email column in the customer table.
Verify that a foreign key constraint can be added to a table.
This tests whether the database can successfully enforce referential integrity between tables.
Add a foreign key constraint to the order table that references the customer table.
Verify that a primary key constraint can be added to a table.
This tests whether the database can successfully enforce uniqueness and non-nullability on a column.
Add a primary key constraint to the product table that uses the product ID column.
Verify that a check constraint can be added to a table.
This tests whether the database can successfully enforce a custom condition on a column.
Add a check constraint to the order table that ensures the order amount is greater than zero.
Verify that a trigger can be created on a table.
This tests whether the database can successfully execute a custom action on a table.
Create a trigger on the shipment table that sends an email notification to customers when their order is shipped.
Verify that a view can be created in the database.
This tests whether the database can successfully create a virtual table based on other tables.
Create a view that shows the total revenue generated by each product.
Verify that a stored procedure can be created in the database.
This tests whether the database can successfully create a reusable block of code.
Create a stored procedure to update the inventory levels of a product based on recent orders.
Verify that a user can be granted permissions on a table.
This tests whether the database can successfully manage access to data.
Grant a customer service representative permission to view customer records.
Verify that a user can be denied permissions on a table.
This tests whether the database can successfully restrict access to data.
Deny a marketing analyst permission to view sales data.
Verify that a backup can be created for the database.
This tests whether the database can successfully create a copy of the data for disaster recovery.
Create a backup of the database every night at midnight.
Verify that a restore can be performed on the database.
This tests whether the database can successfully recover from a backup.
Restore the database from a backup after a hardware failure.
Verify that a database can be detached from the server.
This tests whether the database can successfully be removed from the server for maintenance.
Detach the database from the server to install a software update.
Verify that a database can be attached to the server.
This tests whether the database can successfully be added back to the server after maintenance.
Attach the database back to the server after completing the software update.
Verify that a database can be renamed.
This tests whether the database can successfully be given a new name.
Rename the database to reflect a recent rebranding of the company.
Verify that a database can be shrunk.
This tests whether the database can successfully reduce its size.
Shrink the database to free up disk space.
Verify that a database can be expanded.
This tests whether the database can successfully increase its size.
Expand the database to accommodate increased traffic during a holiday sale.
Verify that a database can be optimized.
This tests whether the database can successfully improve its performance.
Optimize the database by rebuilding indexes and updating statistics.
Verify that adatabase can be backed up while in use.
This tests whether the database can successfully create a backup while users are accessing it.
Create a backup of the database during business hours to ensure continuous availability.
Verify that a database can be migrated to a new server.
This tests whether the database can successfully move to a different server.
Migrate the database to a new server with better performance and reliability.
Verify that a database can be replicated.
This tests whether the database can successfully create copies to improve performance and availability.
Replicate the database to a secondary server for load balancing and failover.
Verify that a database can be mirrored.
This tests whether the database can successfully create a secondary copy for disaster recovery.
Mirror the database to a secondary server for automatic failover in case of a primary server failure.
Verify that a database can be clustered.
This tests whether the database can successfully be distributed across multiple servers for high availability.
Cluster the database across multiple servers to ensure continuous availability and scalability.
Verify that a database can be secured.
This tests whether the database can successfully protect against unauthorized access and attacks.
Secure the database by implementing strong passwords, encryption, and access controls.
Last updated