Some unpopular test interview questions

During the software testing interview process, I have encountered some unpopular questions. The probability of being asked is relatively low, but there is a possibility that I will be asked. Now I will share them with you (including relevant answers, for reference only):

1. What are the reasons for slow database query? What are the solutions?

1. Procedural problem, not using index. Creating indexes based on the columns that need to be queried can greatly improve query efficiency. Of course, the index cannot be built too large. It is better to use columns with smaller bytes to build indexes.

2. Low I/O throughput. At this time, indexes, logs, etc. can be placed on different I/O logs to increase read and write speeds.

3. Insufficient memory. At this time, you need to replace hardware with larger memory and upgrade the system.

4. The table structure setting is unreasonable. To maximize query speed, it is best to break the table into multiple tables, each containing only the necessary columns.

5. The database load is too large. At this time, you need to use caching to reduce the load and improve query speed.

6. Writing SQL statements is too complicated. The execution of too complex SQL statements will slow down the system response time. If not necessary, break down complex SQL statements into multiple simple statements.

7. The server configuration is poor. Adjust the server configuration and optimize it to achieve the best within the allowed range.

8. The database query volume is too large. The method adopted at this time is the same as optimizing SQL statements. Multiple queries can be used to reduce the amount of data.

9. The cost of connecting to the database is too high. At this time, you can use a connection pool to improve database performance.

2. What is synchronization and what is asynchronous? What's the difference between them?

Synchronization refers to the communication method in which the sending end sends data and waits for the receiving end to send back a response before sending the next data packet.

Asynchronous means that after the sender sends the data, it does not wait for the receiver to send back a response and directly sends the next data packet.

The difference between them: synchronous needs to wait, while asynchronous does not need to wait. Under normal circumstances, an asynchronous sending method that does not require waiting is chosen, so that the execution efficiency is high. Moreover, synchronization is not only a matter of waiting during the request process, but also if anything goes wrong in the middle step.

3. What other areas can be optimized in the where statement of mysql?

1. Try to avoid using != or <> operators in where clauses, otherwise the database engine will give up the index by default and perform a full table scan, which will be quite time-consuming to execute.

2. Try to avoid judging the null value of the field in the where clause, otherwise it will cause the engine to give up the index and perform a full table scan. Under the premise of ensuring that the field cannot be null, you can use 0 to replace the field to judge.

3. Try to avoid using or in the where clause to perform connection queries, otherwise a full table scan will be performed. It can be replaced by union all splicing.

4. How to test the paging function?

1) When no data is presented, the homepage, previous page, next page, and last page labels are all grayed out and cannot be clicked.

2) When on the homepage, "Homepage" cannot be clicked and should be grayed out. In addition, the "Home Page" does not have a previous page, so the "Previous Page" cannot be clicked at this time. "Previous step" needs to be grayed out.

Similarly, on the last page, the "Last Page" and "Next Page" labels are grayed out. On the middle page, all four labels can be clicked and jump to the page that needs to be implemented.

3) Whether each paging label is displayed on the same horizontal line (UI display is an extremely easy to ignore point)

4) Whether the paging label style of each page is consistent  

5) After turning the page, can the data in the page be successfully connected to the previous page, and can it be sorted in the specified order?

6) Whether the total number of paging pages and the content of the current page are displayed correctly 

7) If there is a jump, enter non-numeric characters (English, special characters, etc.) at the page break, enter 0 or a number that exceeds the total number of pages, is there a friendly prompt message? 

8) Randomly click on a page label to see if it can jump to the specified page correctly.

Finally: The complete software testing video tutorial below has been compiled and uploaded. Friends who need it can get it by themselves [guaranteed 100 % free]

Software Testing Interview Document

We must study to find a high-paying job. The following interview questions are from the latest interview materials from first-tier Internet companies such as Alibaba, Tencent, Byte, etc., and some Byte bosses have given authoritative answers. After finishing this set I believe everyone can find a satisfactory job based on the interview information.

Guess you like

Origin blog.csdn.net/wx17343624830/article/details/132815578