Software testing interview, are you ready for the autumn recruit? (with answers)

I have participated in many interviews, large and small, and encountered many pitfalls, but I have not come and summarized them well. Now I summarize the problems I encountered before, and hope that I can deepen my impression in the future.

1. How does appium locate the toast pop-up box?

After appium1.6, the answer needs to upgrade u2 for positioning.

2. What is a transaction, know transaction commit and rollback

A transaction is a unit of concurrency control, a user-defined sequence of operations. These operations are either done or not done, and are inseparable units of work. Through transactions, sql server can bind a set of logically related operations together, so that the server maintains the integrity of the data, mainly used for some programs with high integrity of the operation process. (Characteristics of transactions: atomicity, consistency, isolation, durability).

Transaction commit is all operations that commit a transaction: specifically, all updates to the database are written back to the physical database on disk, and the transaction ends normally.

Transaction rollback is the state where the database returns to the beginning of the transaction; some kind of failure occurs during the operation of the transaction, and the transaction cannot continue to execute. state at the time.

3. How to optimize the database

There are roughly 8 methods: (specific reference link: https://www.cnblogs.com/luokakale/p/7242839.html)

a. Select the most used field attribute

b. Use joins instead of subqueries

c. Use unions instead of manually created temporary tables

d. Use transactions

e. Lock table

f. Use foreign keys

g. Use index

h. Optimize the query statement

4. What is a distributed system architecture

A distributed architecture system is simply a software architecture design that runs on multiple processors. A distributed system is a software system built on a network. It is precisely because of the characteristics of software that it has a high degree of cohesion and transparency.

5. What command can be used in linux to view the detailed memory of the system

top press c to see the full command

6. The difference between list and dictionary in python, the difference between list and tuple

Tuple: The tuple is often represented by parentheses, that is: (), and the element is added with a comma, which is the identity of the tuple.

List (list): Lists are usually represented by square brackets, namely: []. To create a list, just use square brackets to enclose different data items separated by commas.

Dictionary (dict): A dictionary contains its data by curly braces {}. The curly braces contain a key (key) and its corresponding value (value), a pair of keys and values ​​become an item, and the key and value use a colon: Separate, items are separated by commas, an empty dictionary is a dictionary that does not contain any items, and it can also be understood as an empty dictionary that does not contain any content in curly brackets, which is directly represented by curly brackets {}

The difference between a list and a dictionary: The search and insertion speed of the dictionary is extremely fast, and it will not increase with the increase of the key value. It requires a lot of memory and wastes a lot of memory.

The difference between a list and a tuple: the tuple is faster than the list operation, cannot change the data, can be used in string formatting, and can be used as the key of the dictionary

7. Have functions such as if used in the database?

if can be used as an expression or as a flow control statement in a stored procedure (specific reference link: https://blog.csdn.net/caidingnu/article/details/88772170)

8. What is dirty data?

Dirty data is generated in temporary updates (dirty reads). For example, transaction A updates a data item x, but for some reason, transaction A has a problem, so A must be rolled back. But before the rollback, another transaction reads the value of data X (after A is updated), A rolls back the transaction, and the data item restores its original value. What transaction B reads is a "temporary" value of data item X, which is dirty data.

9. What is idempotency?

That is, the result of one request or multiple requests made by the user for the same operation is consistent. There will be no side effects due to multiple clicks. A simple example is payment. The user uses payment to purchase goods, and the payment is deducted successfully, but when the result is returned, the network is abnormal, the money has been deducted, and the user clicks again. At this time, a second deduction will occur, and the result is returned successfully. More money is deducted from the user's balance inquiry and cashback. The running water record becomes two, which is idempotency.

10. I now have a program that runs very slowly on Windows. How can I tell whether there is a problem with the program or a problem with the hardware and software systems?

1. Check whether the system has poisoning characteristics;
2. Check whether the software/hardware configuration meets the recommended software standards;
3. Check whether the current system is independent, that is, there is no external service that consumes CPU resources;
4. If yes For software with C/S or B/S structure, it is necessary to check whether it is caused by a problem with the connection to the server or an access problem;
5. When the system does not have any load, check the performance monitor to confirm that the application is correct CPU/memory access

11. Four major components of Android

Activity communicates through Intent
service service is used to complete user-specified operations in the background
Content provider Specify data set to provide to other applications
Broadcast Receiver Filter external events

12. What is multithreading?

A thread is a single sequential flow of control in a program. Running multiple threads simultaneously in a single program to complete different work is called multithreading.

13. The vim mode in linux has

1. Command mode, 2. Editing mode, 3. Last line mode

14. Computer Network Model

Seven-layer model (application layer, presentation layer, session layer, transport layer, network layer, data link layer, physical layer) Five-layer model (application layer, transport layer, network layer, data link layer, physical layer)

15. What is the subnet mask

It is a bitmask used to indicate which bits of an IP address identify the subnet the host is on, and which bits identify the host. The subnet mask cannot exist alone, it must be used in conjunction with the IP address. The subnet mask has only one function, which is to divide an IP address into two parts: the network address and the host address.

16. What will you do if the test time is not enough?

Testing is currently mainly product testing and project testing. Do your own company's product testing, if it can not be completed according to the original plan, in order to be responsible for the quality, you can generally apply for an extension.
If it is a project, under the pressure of contract and customer acceptance, if it cannot be completed as originally planned, it is a project risk. The processing method is basically "first test the functions that customers are more concerned about and commonly used" to ensure that they pass the customer's acceptance and get the project payment. Analyze the function points concerned by customer acceptance (for example, what requirements the customer has raised in the past few days, they must be tested, because the time is short, he must remember), analyze the most vulnerable parts of the system, and go through all business processes. When customers accept, they don't care and can't think of places that can't be tested (such as many synchronization functions in the system)

17. What are the performance indicators?

Number of registered users, number of online users, number of concurrent users, request response time, transaction response time, hits per second, throughput rate, business success rate, tps (transactions per second), resource utilization, cpu, memory, bandwidth Wait

18. What is an interface?

The channel that transmits data is called an interface

19. The basic 6 laws of testing

Functionality, reliability, efficiency, portability, maintainability, ease of use

20. What does the interface test measure?

a. Passability verification

b. Parameter combination

c. Interface security

d. Exception verification

e. Design test cases according to business logic

21. How to create abnormal situations when capturing packets with fiddler;

By breaking the point before the request, you can modify the request parameters

22. What is mq and what are the characteristics of mq?

A container that holds the message in a queue that places the data to be transmitted.

The characteristics of mq are: asynchronous, decoupling, broadcasting, flow control and pinning

23. How to ensure the quality of software testing

What testers need to do

Design of test strategy: Quality is multi-dimensional, a combination of functional testing, performance testing, compatibility testing and other test types

Use case quality: adopt appropriate use case method, how to conduct requirement analysis, use case review

Execution quality: Guaranteed execution depth (interface, associated modules, databases, logs) and breadth (system test type)

Defect quality: bug review, introduction of appropriate bug process

Process quality: reasonable software testing process, testing process monitoring

24. Differences between android and ios system testing

1. On Android, long press the home button to call out the application list and switch applications, and then swipe right to terminate the application;
2. Multi-resolution test, there are more than 20 kinds of Android terminals, but less ios;
3. Mobile operating systems, more Android than ios There are few and cannot be downgraded, only one-way upgrade; the resource library in the new ios system is not fully compatible with the application in the lower version of the ios system, and the application in the lower version of the ios system calls the new resource library, which will directly lead to flash Crash;
4. Operating habits: Android, whether the Back key has been rewritten, test whether the feedback after clicking the Back key is correct; whether the application data can run normally after moving from memory to SD card, etc.;
5. Push test: Android : Click the home button, when the program is running in the background, receive push at this time, click to wake up the application, whether it can jump correctly at this time; ios, click the home button to close the program and the screen lock screen (red dot display);
6 、Installation and uninstallation test: There are many platforms, tools and channels for Android to download and install, ios mainly includes appstore, iTunes and testflight download;
7. Upgrade test: Necessary conditions that can be upgraded: the old and new versions have the same signature; the old and new versions have the same signature; Have the same package name; there is an identifier to distinguish the old and new versions (such as version number), for Android, if there is a built-in application, you need to check whether the built-in file matches after the upgrade (such as the built-in input method)

25. Use middleware, the role of middleware!

Specifically, middleware shields the complexity of the underlying operating system, enables program developers to face a simple and unified development environment, reduces the complexity of program design, and focuses on their own business instead of programming The work is repeated by porting on different system software, thus greatly reducing the technical burden.

26. What is orm (object relational mapping)

To solve the phenomenon of mismatch between object-oriented and relational databases, in short, orm is to automatically persist the objects in the program to the relational database by using the metadata that describes the mapping between the objects and the database.

27. What command is used to view the mobile phone memory of the app

adb shell dumpsys meminfo 包名(com.mbox.cn)

28. What is ANR (applicaton not responding)

29. APP log analysis to find the keyword crash ANR Exception ERROR force closed

30. Multithreading: A thread is a single sequential control flow in a program. Running multiple threads simultaneously in a single program to complete different work is called multithreading.

31. How unittest works

Use testcase for unit testing, load the use case through testsuit, use testrunner to execute the use case, and testresult to view the execution result of the use case.

32. Given a test project for you, how do you carry out the test work

After getting the project, you don't have to rush to design use cases after you are familiar with the requirements and prototype diagrams, but you need to think about the test ideas first, where to start, which areas need to be covered, which platforms are supported, and what are the different commonly used ones Scenarios, whether it is necessary to consider stability, performance, etc., make a rough test plan for the project, and then refine them one by one according to the rough plan, and finally form a use case, in short:
1. Define the test tasks
2. Analyze the test scope
3. Develop test plans and test cases.

33. What is cdn?

The full name of CDN is Content Delivery Network, which is a content distribution network. The popular understanding is website acceleration and CPU load balancing. It can solve the problem of slow website opening speed caused by cross-operator, cross-regional, low server load capacity, and low bandwidth, etc. question.

34. How to delete specified data in VI mode?

1. Use ctrl+v or v command to switch to block mode

2. Then select the block that needs to be deleted

3. Use the x command to delete

35. Replace the specified content in the linux file

It means that the operation is a file, and the grep command enclosed in `` means that the result of the grep command is used as the operation file.

/yyyy/xxxx/ means to find yyyy and replace it with xxxx, followed by g means that when there are multiple yyyy in a line, replace all, not only the first one

In addition, if you don't need to find subdirectories, you only need to replace in the current directory, just use the sed command, the command is as follows: sed -is/xxxx/yyyy/g ./*.txt

36. How to check the port number under linux

netstat -anp |grep port number

37. The difference between process, thread and coroutine

1. A program has at least one process, and a process has at least one thread

2. The division scale of threads is smaller than that of processes (resources are less than processes), which makes multi-threaded programs have high concurrency

3. The process has an independent memory unit during execution, and multiple threads share memory, which greatly improves the running efficiency of the program

4. Threads cannot run independently and must depend on the process

5. A thread can have multiple coroutines, and a process can also have multiple coroutines alone

6. Thread processes are synchronous mechanisms, and coroutines are asynchronous mechanisms

38. The difference between http protocol and websocket protocol

http protocol: every time the client needs to poll periodically to request the server, and then the server sends data to the client

websocket protocol: allows the server to actively push data to the client, the browser and the server only need to complete a handshake, a persistent connection can be created between the two, and two-way data transmission can be performed

Keep the connection state: Unlike http, websocket needs to create a connection first, which makes it a stateful protocol, and then some state information can be omitted when communicating. And http requests may require each request to carry state information

39. The indicators that performance tests usually need to monitor include:
1. Server Linux (including CPU, Memory, Load, and I/O).
2. Database: 1.Mysql 2.Oracle (cache hit, index, single SQL performance, database[/url] thread number, data pool connection number).
3. Middleware: 1.Jboss 2. Apache (including the number of threads, connections, logs).
4. Network: Throughput, throughput rate.
5. Application: jvm memory, log, Full GC frequency.
6. Monitoring tools (LoadRunner[/url]): user execution, scene status, transaction response time, TPS, etc.
7. Test machine resources: CPU, Memory, network, disk space.
40. Monitoring tools
Performance testing usually uses the following tools to monitor:
1.Profiler. A class for recording logs, independently developed by Alibaba Group and embedded in the application code.
2. Jstat. Monitor the GC status of the java[/url] process to determine whether the GC is normal.
3. JConsole. Monitoring java memory, java CPU usage, thread execution, etc., needs to be configured in the JVM parameters.
4. JMap. To monitor whether the java program has memory leaks, it needs to be used with the eclipse plug-in or MemoryAnalyzer.
5. JProfiler. To comprehensively monitor the CPU usage, memory usage, cumulative response time, thread execution, etc. of each node, you need to configure it in the JVM parameters.
6. Nmon. Comprehensive monitoring of Linux system resource usage, including CPU, memory, I/O, etc., can be independent of application monitoring.
7. Valgrind. Monitors C/C++ programs for memory leaks, based on the Linux environment.
8. Vmmap and ApplicationVerifier. Monitors C/C++ programs for memory leaks, based on the Windows environment.

Encouragement: [Tutorials that may help you]

These materials should be the most comprehensive and complete preparation warehouse for friends who do [software testing]. This warehouse has also accompanied me through the most difficult journey. I hope it can also help you! Everything should be done as early as possible, especially in the technology industry, and the technical foundation must be improved.

Follow my WeChat public account [Program Yuanmuzi] to get it for free~
insert image description here

If you don't climb a mountain, you don't know how high the sky is. Waiting will only make you miss, and struggle will be successful.

insert image description here

My study group: 644956177 There are technical experts in the group to communicate and share~

Guess you like

Origin blog.csdn.net/Xsk215/article/details/117121222