📅  最后修改于: 2020-12-06 11:25:14             🧑  作者: Mango
数据库测试包括执行数据有效性,数据完整性测试,与数据库相关的性能检查以及测试数据库中的过程,触发器和功能。
考虑一个应用程序,该应用程序可以捕获用户的日常交易详细信息并将其存储在数据库中。从数据库测试的角度来看,应执行以下检查-
来自应用程序的交易信息应存储在数据库中,并且应向用户提供正确的信息。
信息加载到数据库时不应丢失。
应用程序仅应存储已完成的事务,而所有未完成的操作应中止。
应当保留对数据库的访问授权。不得提供未经批准或未经授权的用户信息访问。
执行数据库测试有多种原因。由于后端系统负责存储数据并且出于多种目的而被访问,因此需要在数据库上执行数据完整性,验证和数据一致性检查。
下面给出了一些数据库测试的常见原因-
为了减轻对数据库后端的调用的复杂性,开发人员增加了查看和存储过程的使用。
这些存储过程和视图包含关键任务,例如插入客户详细信息(姓名,联系信息等)和销售数据。这些任务需要在多个级别上进行测试。
在前端执行黑盒测试很重要,但是很难找出问题所在。在后端系统上进行测试可以提高数据的健壮性。这就是为什么在后端系统上执行数据库测试的原因。
在数据库中,数据来自多个应用程序,并且有害或不正确的数据可能存储在数据库中。因此,需要定期检查数据库组件。此外,应定期检查数据完整性和一致性。
数据库测试与前端UI测试不同。下表突出显示了主要区别-
Database Testing | UI Testing |
---|---|
Database testing is known as data validation and integrity testing or back-end testing. |
UI testing or front-end testing is also called Application testing or GUI testing. |
Database testing involves testing of back-end components, which are not visible to users. This includes database components and DBMS systems such as My SQL, Oracle. |
UI testing involves checking functionalities of an application and its components like forms, graphs, menus, reports, etc. These components are created using front-end development tools like VB.net, C#, Delphi, etc. |
Database testing involves checking stored procedures, views, schemas in database, tables, indexes, keys, triggers, data validations and data consistence check. |
UI testing involves checking the functionality of application, buttons, forms and fields, calendar and images, navigation from one page to other, and the overall functionality of the application. |
To perform DB testing, a tester needs a thorough knowledge of database concept − like procedures and functions, views, indexes, keys and good hands-on SQL. |
To perform UI testing, a tester needs a good understanding of business requirements, application functional knowledge, coding, etc. |
Data comes from multiple heterogeneous data sources over web applications, Intranet applications and various other applications. |
Data is entered manually into applications. It involves functional testing of front-end applications. |