Interview Question Collection (3)

Please answer what is the α test and β test, and when to use them

  • Alpha test: conducted in a controlled environment, conducted by the user at the developer ’s premises, and tested under the guidance of the developer to the user
  • Beta test: Real application in an environment beyond the control of the developer, conducted by the end users of the software in one or more customer sites, the user records a series of problems encountered in the test, and regularly reports to the developer .

What is the focus of unit testing, integration testing, and system testing?

  • Unit testing is the lowest-level testing activity to be carried out during the software development process. The test focuses on the system modules, including the correctness verification of subroutines .
  • Integration testing, also called assembly testing or joint testing. On the basis of unit testing, all modules are assembled into subsystems or systems according to design requirements for integration testing. Practice has shown that although some modules can work individually, they cannot be guaranteed to work properly when connected. Problems that cannot be reflected in some parts of the program are likely to be exposed globally and affect the realization of functions. The test focuses on the connection between modules and the transfer of parameters .
  • System testing is to assemble the tested subsystem into a complete system to test. It is an effective method to check whether the system can indeed provide the functions specified in the system program specification. The test focuses on the operation of the entire system and its compatibility with other software.

What do you think is the core competitiveness of software testing

  • The core competitiveness lies in finding problems early and being able to find problems that others cannot.
  • 1. Early problem detection: The earlier the problem is discovered, the lower the cost of resolution. If a requirement can be discovered before it is fulfilled, the value of such a problem is the highest.
  • 2. Discover problems that others cannot discover: problems that everyone can discover, if you find it, then you can prove that you can be replaced. Others ca n’t find it, and you can find it, then you just ca n’t be replaced.

Please stress test the chicken eating game

1. First of all, make clear what needs to be tested:

1. Game server hardware

  • a. Hard disk I / o b. Memory c. CPU

2. Network pressure

  • a. Long connection   
  • a1. Maximum number of connections
  • a2. Flow (intranet, extranet, in, out)
  • b. Long connection and short period (similar to the TCP application of Http, this is a special requirement, specifically for LoginAgent)
  • b1. Number of connections established per second
  • b2. Actual processing capacity

3. Database

  • a. number of transactions per second b. number of lock waits per second c. average delay (ms) d. CPU temporary

4. The optimal number of threads for multithreading

  • a. Multithreading performed by the database b. Multi-connection processing

Please design test cases according to the WeChat login interface

Reference answer:

1. Functional test

  1. Enter the correct username and password and click the submit button to verify that you can log in correctly.
  2. If you enter the wrong user name or password, the login verification will fail and the corresponding error message will be displayed.
  3. Can I jump to the correct page after successful login
  4. Check whether you can select different login methods to log in, such as log in using mobile phone number, log in using WeChat account or scan code.
  5. Function to remember username
  6. The function that cannot record password after login failure
  7. Whether the password is not displayed in plain text, use symbols such as asterisks and dots instead.
  8. When there is a verification code, it is also necessary to consider whether the text is too distorted, which makes it difficult to recognize, and whether the color, refresh or change a button is easy to use
  9. Are the links on the login page such as registration, forgot password, and logout logged in with another account correct?
  10. When entering the password, there is a prompt message when the capital keyboard is turned on.
  11. Enter nothing and click the submit button to check the prompt information.

Second, the interface test

  1. Whether the layout is reasonable and whether the testbox and buttons are neat.
  2. Whether the length and height of testbox and button are compound requirements.
  3.  Whether the design style of the interface is unified with the design style of the UI.
  4.  The text in the interface is concise and easy to understand, with no typos.

3. Performance test

  1. Open the login page, whether the required time is within the required time.
  2. After entering the correct user name and password, check whether the time for successfully logging in to the new page is within the required time.
  3. Simulate a large number of users to log in at the same time, and check whether they can log in normally under a certain pressure.

4. Security Test

  1. Whether the cookie generated after successful login is httponly (otherwise it is easy to be stolen by the script).
  2. Whether the user name and password are sent to the Web server through encryption.
  3. User name and password verification should be server-side verification, not just javascript verification on the client side.
  4. User name and password input boxes should be shielded from SQL injection attacks.
  5. The input box for the user name and password should prohibit the input of scripts (to prevent XSS attacks).
  6. Prevent brute force cracking and check if there is a limit on the number of false logins.
  7.  Whether to support multiple users to log in on the same machine.
  8. Can the same user log in on multiple machines.

Five, compatibility test

  1. Whether it can display normally and function normally under different mobile platforms or PC environments
  2. Whether it can display normally and function normally under different WeChat versions on the same platform.
  3. Whether the display is normal at different resolutions.

What impressive bugs have you encountered, and what are the reasons for bugs in the interface test?

When uploading an image with jmeter test, explain specifically:

 

Common bugs in interface testing are the following:

  • Improper handling of special values ​​causes the program to exit abnormally or crash
  • Type boundary overflow, resulting in data alone and inconsistent writing
  • The correct error message is not returned outside the value boundary
  • Permission is not processed, you can access other users' information
  • The logic check is not perfect, and the loophole can be used to obtain illegitimate benefits
  • Improper state handling, resulting in logic errors
  • The program exits abnormally when the number of items of the array type is 0 or items are repeated

Have you ever done a stress test in a project, how to do it

Reference answer:

1. First analyze the system to be tested and make sure that you need to stress test that part, such as spike, pay

2. How to apply pressure to these test points

The first way is to write a script to generate a pressure robot to send and receive packets to the server

The second point is to use some stress testing tools such as Jmeter, LoadRunner

3. How to apply correct pressure to these test points

Need to use stress test tools or other methods to record scripts to simulate user operations

4. How much pressure on the test point design is more appropriate?

Need to clarify the number of stress test limits, that is, the number of concurrent users

5. How to use these data to locate performance problems after the test

Through the test, you can get data such as throughput and average response time. Behind this data is the result of the combined effect of the entire background processing logic. At this time, you can first pay attention to the system's CPU and memory, and then compare the throughput. When the average response time reaches the bottleneck With these data, you can then confirm which part of the system caused the performance problem

For a large number of concurrent access to the system, how would you do the test, any suggestions

How to test highly concurrent systems? Generally speaking, the overall test strategy is: first perform performance tests and stress tests on some systems to obtain the peak processing performance of each part, and then simulate the overall process test, focusing on testing the overall business process and business Expected load, focus on testing the following points:

  1. Different provinces and different operators CDN node performance, you can use the typical stress test program
  2. The core computer room BGP network bandwidth, this part focuses on testing the reliability of the BGP network of each operator, the actual rate, generally use smokeping, lxChariot and other tools
  3. All kinds of hardware equipment performance, generally use professional network equipment testing tools
  4. Various server concurrent performance, distributed processing capabilities, can use stress test program tools
  5. Business system performance, using business system stress test program
  6. Database processing performance, this part needs to be tested in conjunction with the business system to obtain the TPS / QPS of the database in the core business scenario,
  7. If you have a payment function, you need to conduct payment channel interface and shunt tests. This part may be the biggest bottleneck. In addition, it also involves the testing of backup solutions, disaster recovery solutions, and business downgrade solutions.

Please answer what are the commonly used shell commands related to the network, the difference between the three netstat, ping, ifconfig, what are their functions, and what is the port status of the general server in netstat after it is started

Commonly used network related commands are as follows:

1、ifconfig

This command is used to display the network interface, subnet mask

2、host和nslookup

These two commands are DNS lookup tools. When executing host, all ips of a certain domain name will be listed. Nslookup is a command similar to host. It is used to query DNS-related details and name resolution.

3、route

Show routing table

4、traceroute

This command displays all gateway addresses of the grouping path

The three differences between netstat, ping, and ifconfig:

netstat: displays the network status, using netstat can let you know the network situation of the entire Linux system, the syntax is netstat [-acCeFghilMnNoprstuvVwx] [-A <network type>] [-ip]

ping: The function is to detect the host, because the ping command will use the icmp transmission protocol to send a message requesting a response. If there is no problem with the network function of the remote host, it will respond to the message, so the host is operating normally. The syntax is: ping [-dfnqrRv] [-c <number of completions>] [-i <interval seconds>] [-I <network interface>] [-l <preload >> [-p <template style>] [- s <packet size>] [-t <live value>] [host name or IP address

ifconnfig: The function is to display or set network devices, the syntax is: ifconfig [network device] [down up -allmulti -arp -promisc] [add <address>] [del <address>] [<hw <network device type> < Hardware address>] [io_addr <I / O address>] [irq <IRQ address>] [media <network media type>] [mem_start <memory address>] [metric <number>] [mtu <byte>] [netmask <Subnet mask>] [tunnel <address>] [-broadcast <address>] [-pointopoint <address>] [IP address]

After the server is started, it is generally in the listening state

Do you know cross-domain, what are the conditions, what needs to be added in the header, there are several options

What is cross-domain?

  • When a browser requests resources of another domain name from a web page of a domain name, any different domain name, port, and protocol are cross-domain

Several options for cross-domain:

  1. Cross-domain based on script tags
  2. Cross-domain based on jquery
  3. Crossing subdomains through iframe

From opening the browser, enter the url to reach a Controller in the project on the server, please describe the process

In this process, network communication occurs, that is, using tcp / ip protocol cluster for network communication. The sending end goes down from the application layer, and the receiving end goes up from the data link layer. The steps are as follows:

  1. Browser input URL, where http is the protocol
  2. DNS resolution at the application layer, returning the corresponding IP address
  3. Application layer client sends http request,
  4. The network layer ip query mac address,
  5. Transport layer TCP transfer message
  6. The data reaches the data link layer, at which time the client sends the request to end
  7. The server receives the data packet at the data link layer, and then down to the application layer,
  8. The server responds to the request, finds the resource requested by the client and returns a response message

Please write mysql delete statement

1. Drop statement. Can be used to delete databases and tables.

  • Use the drop statement to delete the database: drop database db;
  • Use the drop statement to delete the table: drop table tb;

2. Delete statement. Used to delete fields in the table.

  • delete from tb where id=1;
  • If where is not added to the delete statement, all records in the table will be deleted:

3. Use truncate to delete all fields in the table:

  • truncate table tb;

Please write some basic SQL statements

  • Select: select * from table1 where range
  • 插入:insert into table1(field1,field2) values(value1,value2)
  • Delete: delete from table1 where range
  • Update: update table1 set field1 = value1 where range
  • Find: select * from table1 where field1 like '% value1%' --- like syntax is exquisite, check the information!
  • 排序:select * from table1 order by field1,field2 [desc]
  • 总数:select count as totalcount from table1
  • 求和:select sum(field1) as sumvalue from table1
  • 平均:select avg(field1) as avgvalue from table1
  • 最大:select max(field1) as maxvalue from table1
  • 最小:select min(field1) as minvalue from table1

There are 10 identical data in a certain table, now I want to delete 9 of them, please write sql statement

  • delete * from table_name limit 9

 

Please design a test case: a series of numbers, the identification of leap years

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Published 29 original articles · Like1 · Visits 573

Guess you like

Origin blog.csdn.net/wennie11/article/details/105554741