In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
1. What is a database test?
Database testing is also known as back-end testing. Database testing is divided into four different categories.
[if! supportLists] [endif] data integrity testing
[if! supportLists] [endif] data validity test
[if! supportLists] [endif] Database-related performance
[if! supportLists] [endif] Test functions, programs, and triggers
Second, the basic structure of the data in the database
Definition one: the relationship between the elements in a collection of data elements (also known as data objects).
Definition 2: a collection of data elements that have a specific relationship with each other.
A table (database) is called a data structure, which is composed of many records (data elements). Each element also includes many fields (data items) to compose database test classification system testing, integration testing, unit testing, functional testing, performance testing, security testing system testing, database analysis and testing in the initial design.
Third, database test classification
From the point of view of the testing process, we can also divide database testing into
System testing
The database needs to analyze and test the requirement coverage in the initial design. On the other hand, we need to make sure that the database design document is the same as the final database, and when the design document changes, we also need to verify whether the changes are implemented on the database.
At this stage, our testing is mainly achieved through database design review.
Integration testing
Integration testing is mainly aimed at the interface, and the database needs to consider the
Modify operation of data item
Add operation of data item
Delete operation of data item
The data table is full.
Delete empty datasheet
Delete records in an empty table
Concurrent operation of data table
Interface testing for stored procedures
Interface test of correlation table combined with business logic
Similarly, we need to test these interfaces by using equivalence classes, boundary values, error guesses and other methods.
Unit testing
Unit testing focuses on logical coverage, and the unit test of database development is relatively simple and can be completed by sentence coverage and walk-through.
And we can also classify databases from the point of view of test concerns.
Function test
We can rely on tools to test the function of the database
DBunit
An open source database functional testing framework that can perform white-box unit tests on the basic operations of the database and verify the input and output
QTP
Through the capture and identification of objects, we can simulate the operation flow of users through QTP, and test the data in the whole database through the verification method or combined with the monitoring of the database background. More inclined to the gray box.
DataFactory
An excellent automatic database data generation tool, through which you can easily generate any structure database, fill the database, and help you generate the large amount of data you need to verify whether the function in our database is correct. Belongs to the black box test.
Database performance
Performance optimization is divided into four parts.
1. Physical storage aspect
two。 Logical design
3. Parameter adjustment of database
4.SQL statement optimization.
Database performance testing tools:
Loadrunner
You can do stress testing on the database by programming the protocol
Swingbench (this is a heavyweight feature, similar to LR, and very powerful, but specifically for oracle)
Safety testing
Since the SQL injection attack was discovered, the foolproof database has changed from the background to the foreground, and once the database is breached, the whole system will be exposed to the hacker. Through the powerful stored procedure of the database, the hacker can easily obtain the authority of the whole system. However, the injection of SQL seems simple and difficult to prevent. For security testing, how to prevent the system from being injected is the difficulty of testing.
What do we need to check normally in database testing?
Typically, what we check in DB Testing is:
[if! supportLists] [endif] constraint check
[if! supportLists] [endif] verify field size
[if! supportLists] [endif] stored procedure
[if! supportLists] [endif] match the application field size to the database
[if! supportLists] [endif] Index of performance-based questions
5. Explain what is data-driven testing?
In a datasheet, data-driven tests are used to test multiple data. By using it, it can easily replace parameters from different locations at the same time.
What are connections and mention different types of connections?
Join is used to display two or more tables, and the join type is:
[if! supportLists] [endif] naturally join
[if! supportLists] [endif] Inner join
[if! supportLists] [endif] join outside
[if! supportLists] [endif] Cross join
The outer connection is divided into two parts:
[if! supportLists] [endif] left outer connection
[if! supportLists] [endif] right outer connection
What is an index and mentions different types of indexes?
Indexes are database objects that are created on columns. In order to get data quickly, visit them frequently. The different types of indexes are:
[if! supportLists] [endif] B-tree index
[if! supportLists] [endif] bitmap index
[if! supportLists] [endif] clustered index
[if! supportLists] [endif] coverage index
[if! supportLists] [endif] non-unique index
[if! supportLists] [endif] unique index
What are the steps for loading test data in database testing?
The following steps need to follow the test data load
[if! supportLists] [endif] should know the source data
[if! supportLists] [endif] Target data should be known
[if! supportLists] [endif] should check the compatibility of the source and destination
[if! supportLists] [endif] in SQLEnterprise Manager, open the corresponding DTS package and run the DTS package
[if! supportLists] [endif] you must compare the columns of the target and the data source
[if! supportLists] [endif] should check the number of rows in the destination and source
[if! supportLists] [endif] after updating the data in the source, check to see if the changes are displayed in the destination.
[if! supportLists] [endif] check for NULL and junk characters
What is the method of writing test cases for database tests?
Writing test cases is like functional testing. First, you must understand the functional requirements of the application. Then you have to decide the parameters for writing the test case.
[if! supportLists] [endif] goal: write down the target you want to test
[if! supportLists] [endif] input method: write an operation method or input to be performed
[if! supportLists] [endif] anticipates how it should appear in the database
Which SQL statements did you use in database testing to manage and manipulate test tables?
Statements such as SELECT,INSERT,UPDATE,DELETE are used to manipulate tables, while ALTER TABLE,CREATE TABLE and DELETE TABLE are used to manage tables.
Summary:
The robustness, fault tolerance and resilience of the database are also the key points of our testing. We can also find that functional testing, performance testing and security testing are a process from simple to complex. It is also a skill that database testers need to master step by step, which is also the basic requirements for database testers in the future.
Welcome to join the 51 software testing family, where you will get [latest industry information], [free test tool installation package], [software testing technology], [job interview skills]. 51 learn and grow with you! Looking forward to your joining: QQ Group: 755431660
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.