Interview questions I experienced

1. The difficulty of automated testing?

①Maintenance of public automation use cases

② Public UI method maintenance

③ Stability and efficiency improvement:

  |, Exception handling package

  | 、 Layered test

  | 、 Build shared object library / test library

  | 、 Introduction of third-party plug-ins

  |, GUI business process decoupling and splitting, try to avoid too long end-to-end UI testing (such as web-to-mobile business flow testing)

  | 、 Introduce mock / interface test to replace part of the test, so as to connect to the implementation of automated testing, improve the stability and efficiency of automated testing

  |, The web handles some unrecognized third-party controls. Use js to process as much as possible, more stable and efficient

  |, Uiautomator monitors and deals with system-level pop-ups of uncertain android system

④Automatic test implementation project selection strategy:

  |, Highly repeatable and necessary testing process

  |, The project cycle is long, the system version is constant, and the demand will not change the project frequently

⑤Automated testing framework includes:

  |, Distributed execution of test cases: seleniumGrid

  |, Modularization of scripts: layering

  |, Data driven: mysql store data, testng data provider

  |, Log analysis: local log4 use case execution information

  |, Error screenshot: monitor screenshot

  |, Report recovery: test data storage mysql database, etc.

  |, Shared Object Library / Public Function Library: UI Element Information Management / UI Element Operation Method Maintenance

  |, Environment configuration: chromedriver / adb / IEdrver / Firefoxdriver

  |, Use case unified design pattern: base class (test case beforeclass / afterclass), multiple use cases are concentrated in a requirement / module

  | Exception handling: testngListenter monitoring, UIwater processing system-level pop-up window

  |, Interface and mock integration

  | 、 Introduction of third-party tools: adb / shell / redis

  | Use case execution method (distributed test seleniumGrid, device multiple concurrent test)

2. ATM machine deposit test case is roughly:

Deposit normal banknotes, balance display

High imitation coins are put in, the balance is displayed

Put fake coins in, the balance is displayed

Normal coins are missing and the balance is displayed

Normal coins are torn in half and put in, the balance is displayed

Normal coins are folded in and the balance is displayed

Normal coins and high-counterfeit coins are put in, and the balance is displayed (put in and out of phase)

Coins that do not support deposits, such as normal coins and a dollar, are displayed, and the balance is displayed.

3. Bottleneck of jmeter concurrent testing?

The network bandwidth of the server is too low, which results in too low QPS. The number of QPS requests per second = concurrent number / average response time

Is jmeter locally stressing the server? ? ?

ab (Apache Bench) stress test on the server? ? ?

4. What is the focus of jmeter performance testing?

Throughput, error rate, response time, system resource usage

Throughput is related to the number of concurrency and average response time. Under the application scenario access pressure, as long as a certain item reaches the highest value of the system, the system's throughput will not go up. If the pressure continues to increase, the system's throughput will decline , The reason is that the system is overloaded, and context consumption, memory, and other consumption cause system performance to decline.

Error rate: An error rate greater than 0 does not indicate a problem with the system. By looking at the result tree, response time, and server resource usage, you can determine where the system is experiencing a bottleneck.

Resource usage: After connecting to the server remotely, use commands such as top to monitor system resource usage, and free -m to view memory usage.

Response time : time required to respond to the request = network transmission time: N1 + N2 + N3 + N4 and application server processing time: A1 + A3 and database server processing time: A2

 

5. Set the timeout period when testing the jmeter interface?

Increasing the pressure may cause a connection timeout error, you cannot quit all threads, you can use

 6. Engineering of automated testing?

Use framework unittest

7. jmeter relative concurrency and absolute concurrency:

Absolute concurrency: A synchronous timer (Synchronizing Timer) is used to achieve absolute concurrency, that is, a request is issued at a certain rendezvous point at the same time, and the rendezvous point cannot be greater than the number of threads.

General timeout> number of request sets * 1000 / (number of threads / start time) {10 * 1000 / (200/10)}

Note that when using the synchronous timer for performance testing, the response time in the aggregation report is generally greater than the real response time of the interface. You can view the real response time of the interface through other monitoring tools

 

Guess you like

Origin www.cnblogs.com/mygodswangzi/p/12732283.html
Recommended