How special is the person recruited by ByteDance with a monthly salary of 21k?

As a testing practitioner who has gone through vicissitudes and sees through the various aspects of the Internet industry, I have recently encountered many problems during the interview process. Based on my own experience, I will analyze what knowledge should be prepared before changing jobs as a test engineer in order to be in front of the interviewer. Outstanding performance.

If your job-hopping intention has been confirmed, please read on!

The most important step in job hopping is naturally the interview. During the job hopping season, there are various interview questions on the Internet. It can be confusing for a while, and it is hard to tell which one to look for. Therefore, the author has compiled the following information for your reference only. I hope that every friend who has read this article can pass five tests, be calm, and face the interview with confidence!

 

 

[ Basic Test Theory Questions ]

This kind of question is to test the basic ability of test engineers, such as test plan, test process, how to bug, and what tests you have done. Generally, we think that no matter how good these abilities are, there will be no bonus points, but as long as If you don't do it well, you are an unqualified test engineer. This kind of question will not be asked too much, the general question is as follows:

1. Please describe the testing process of your last company?

2. Please describe several elements of the bug?

3. The difference between white box and black box, how do you use it?

4. How do you do test analysis?

5. How to design test cases? What kind of test case is a good use case?

6. What is the standard for the function test to be launched externally in the beta version?

[ Automated testing related ]

Automation is always unavoidable, you have to know a little bit, interview bonus points. This section includes the automation of some concepts and the use of automated tools.

Contains Selenium, Appium and interface tests.

1. What design patterns are used in the automation code?

singleton pattern

factory pattern

PO mode

data driven model

2. What is an assertion?

Checks a condition, and if it's true, do nothing and the use case passes. If it is false, an AssertError will be thrown with the error message.

3. How to do clustering in UI automation testing?

Selenium Grid, distributed execution use case

Appium uses STF to manage multiple devices

Docker+K8S management cluster

4. How to automate the testing of functions containing verification codes?

universal verification code

Test environment mask verification

Other operations are not recommended

5. How to optimize and improve the execution speed of Selenium script?

Try to use the by_css_selector() method

The execution speed of the by_css_selector() method is faster than that of the by_id() method, because the by_id() method in the source code will be automatically converted to the by_css_selector() method for processing;

When using waiting, try to use explicit waiting, use sleep() less, and try not to implicitly wait;

Minimize unnecessary operations: If you can directly access the page, do not click to access it;

Execute test cases concurrently: execute multiple test cases at the same time to reduce the coupling between test cases;

Some pages take a long time to load and can interrupt loading;

6. What problems can the interface test find?

You can find many bugs that cannot be found by operating on the page;

Check the exception handling capability of the system;

Check the security and stability of the system;

The front end can be changed at will, the interface is tested, and the back end does not need to be changed;

You can test the concurrency situation, one account, and at the same time (more than 2 requests) place an order for the last product, or different accounts, place an order for the last product;

Request parameters can be modified to break through the front-end page input limit (such as amount);

7. How to locate hidden elements in Selenium?

If it is pure positioning, there is no difference between hidden elements and ordinary non-hidden element positioning, just use the normal positioning method (many interviewers can't figure this out);

The hiding and display of element attributes is mainly controlled by type="hidden" and attributes. Next, hide it in the element attributes. Hidden elements can be located normally, but they cannot be operated (locating elements and operating elements are two different things, many Beginners are stupid and unclear), the operating elements are click, clear, send_keys these methods;

JS manipulates hidden elements;

8. How to judge whether an element exists on a page?

Method 1: Use try...except...

Method 2: Use elements to define a set of element methods to determine whether the element exists, return True if it exists, and return False if it does not exist

Method 3: Combining WebDriverWait and expected_conditions judgment (recommended)

9. How to improve the stability of the script?

Do not right-click to copy the xpath (a path that is thousands of miles away, it must be unstable), write the relative path yourself, and use the id to find the node;

There is no problem with positioning, the second influencing factor is waiting, and sleep waiting should be used as little as possible (affecting execution time);

The positioning element method is repackaged, combined with WebDriverWait and expected_conditions to determine the element method, and encapsulates a set of positioning element methods by itself;

10. How to locate dynamic elements?

There are two situations for dynamic elements, one is attribute dynamics, such as id is dynamic, when positioning, then don’t use id to locate;

There is also a dynamic situation, that is, the element will be at the top of the page for a while, and at the bottom for a while, the positioning method is the same for the erratic dynamic element, press f12, and locate according to the element attribute (the step attribute of the tag and name of the element is It will not change, only the class attribute and styles attribute will be moved);

11. How to locate the parent element through the child element

Use the element.parent method

12. What problems do you usually encounter? ? How to solve them?

You can talk about some pitfalls of locating elements that you usually encounter, and then explain why they are not located, such as dynamic id, iframe, no waiting and other factors;

13. An element is obviously located, but the click is invalid (no error is reported), if it is solved?

Use JS to click, Selenium sometimes clicks on the element to fail;

14. Where do you put the test data?

For the account password, this kind of global parameter can be extracted separately with command line parameters, and written in the configuration file (such as ini);

For some one-time consumption data, such as registration, the number is different for each registration, which can be generated by random function;

For an interface with multiple sets of test parameters, it can be parameterized, and the data can be placed in YAML, Text, JSON, and Excel;

For the data that can be used repeatedly, such as the situation where the various states of the order need to create data, it can be placed in the database, and each time the data is initialized, it will be cleaned up after use;

For some parameters of the mailbox configuration, you can use the ini configuration file;

For all independent interface projects, you can use the data-driven method to manage the interface data of the test with excel/csv;

For a small amount of static data, such as the test data of an interface, only 2-3 groups, it can be written at the beginning of the py script, and it will not change for ten or eight years;

15. What is data-driven and how to parameterize it?

The idea of ​​parameterization is that after the code use case is written, there is no need to change the code, just maintain the test data, and generate multiple use cases according to different test data;

16. Other interfaces require the information of the login interface. How to make the login interface only call once in other interfaces?

Use the singleton pattern

Use a custom caching mechanism

Use the setup mechanism in the test framework

Fixture mechanism in pytest

17. How to clean up the garbage data generated by the interface?

For data creation and data cleaning, you need to use python to connect to the database, do the operation test case pre-operation for addition, deletion, modification and query, setUp for data preparation and post-operation, tearDown for data cleaning

18. How to use interface cases to cover business logic?

Consider different business scenarios, what is the process that an interface goes through, what is the logic of the process, what is the result of what parameters, and multi-scenario coverage;

Interface Automation Test

Interface automation testing belongs to the category of gray box testing, and it is simple to implement. It can allow test engineers to intervene in testing early, and can also be used for regression testing. With the development of the market in the future, interface automation testing has become one of the necessary skills for test engineers. Where is the value brought by interface automation testing?

1. How would you perform interface testing without interface documentation?

2. In the process of interface automation testing, how do you design test data and where are your concerns?

3. How to judge whether a defect belongs to the front end or the back end?

4. What is the difference between HTTP and HTTPS?

5. What types of interface requests have you seen before, and briefly describe the differences?

6. Which interfaces return status codes have you seen? Give a few simple examples?

7. In the process of manual interface testing or automated interface testing, how to deal with the data dependence of upstream and downstream interfaces?

8. When an interface has an exception, how do you analyze the exception?

9. Which interface testing tools have you used? Have you ever used code form to realize interface automation testing? What's the difference?

10. Is data-driven involved in the design of the interface automation test scheme, and how is it implemented?

11. Briefly describe the difference between token and seesion?

12. How do you perform interface automation testing for the payment interface?

13. Have you ever used mocks? Briefly describe how you use mocks to simulate interfaces?

14. Irreversible interface automation test data, such as orders, will not be executed next time after deletion. How to ensure that the script can be executed wirelessly without redoing the data?

15. APP and WeChat applets need to implement interface automation testing. Is there any difference between the implementation method and the web terminal?

16. How to perform the weak network test on the mobile terminal?

Performance Test

In the Internet era, customer traffic directly affects the success or failure of a piece of software. Having traffic means that the software server must support product performance. First of all, small and medium-sized companies do not need to design a large-scale performance testing solution system, but the core functions of the software will still guarantee its performance. Second, perform performance testing to find performance bottlenecks. Common performance problems still need to be clear.

1. What are the performance test indicators?

Maximum number of concurrent users, HPS (click rate), transaction response time, transactions per second, hits per second, throughput, CPU usage, physical memory usage, network traffic usage, etc.

The main points to focus on at the front end are:

Response time: The time it takes for the user to send a request from the client, get a response, and display the entire process.

Loading speed: The popular understanding is the speed at which the page content is displayed.

Traffic: The network traffic consumed.

The main focus on the backend is:

Response time: the time from request to response and return of the interface.

Number of concurrent users: the number of users requesting the server at the same time point, and the maximum number of concurrent users supported.

Memory usage: that is, memory overhead.

Throughput (TPS): Transaction Per Second, the number of transactions per second. When no performance bottleneck is encountered: TPS=number of concurrent users*number of transactions/response time.

Error rate: number of failed transactions/total number of transactions.

Resource usage: CPU usage, memory usage, disk I/O, network I/O.

From the perspective of performance test analysis and measurement, performance indicators can be collected and investigated mainly from the following major dimensions:

System performance indicators, resource performance indicators, stability indicators

2. If a requirement does not have a clear performance indicator, how to start performance testing?

First output business data, such as pv, pu, time period, etc., calculate the approximate value, and then continuously increase the pressure to measure the peak value

3. Introduce what is included in the JMeter aggregation report?

Request name, number of threads, response time (50 95 99 min max), error rate, throughput

4. If there is a page that is particularly stuck, imagine the possible reasons?

Background: The interface returns data slowly, query performance and other problems

Front-end: Use Chrome tools to debug, judge JS execution time or other problems

Internet problem

5. Talk about the actual test content in the project

Tell the truth based on the experience in your own project, it is easy to reveal whether you have experience or not.

6. Introduce the process of JMeter for performance testing

Talk about your project experience. You can also search by yourself.

7. Introduce the difference between JMeter and LoadRunner

I won’t go into details, the most important thing is that relatively speaking, LoadRunner is bulky, expensive, closed source, and its concept and ecology are backward, while JMeter is open source, customizable development, powerful and easy to use, and has already been used by major Internet companies. It has a very mature implementation plan (mainstream Internet companies are basically using the JMeter+ELK+Grafana+Influxdb architecture), which can be said to be a necessary skill for entering a big BAT factory. Students who don’t know JMeter yet suggest to make up for it.

Mobile test related

Nowadays, in the world of mobile Internet, who doesn’t have an app, so you will basically ask about this, and you will also read your resume. If you haven’t done it before, you won’t ask too deeply. One piece, so be prepared.

concept question

1. Describe the similarities and differences between web testing and mobile application testing?

2. How do you do application compatibility testing?

3. Please tell me the names and specific meanings of the three commonly used performance indicators under the client?

4. What is the focus of iOS application and Android application testing?

5. Please tell me how the gray scale of the mobile application is done?

practice questions

1. What are the common reasons for app crashes? If the app crashes, how do you capture logs on Android and iOS?

2. Please briefly describe the scenarios that should be considered when upgrading and installing mobile applications?

3. Give you an application, please briefly describe what aspects you will test?

4. Please describe the use case design for sending small videos in WeChat Moments?

5. If you were asked to test scan code payment, what scenarios would you consider?

6. How to test the login scenario of an application?

[ JMeter interview questions ]

1. Explain what are Samplers and Thread groups?

2. Mention what is a regular expression in JMeter?

3. Is the test plan built with JMeter dependent on the operating system?

4. Mention what is the type of processor in JMeter?

5. Explain what is a pre-processor component? List some preprocessor elements?

6. Is the execution order of the test elements mentioned?

7. What do "contains" and "match" in regular expressions mean?

8. Explain what a timer in JMeter is, and what are the types of timers?

9. Explain how to reduce resource requirements in JMeter?

10. How many JMeter listeners are listed?

11. Is it necessary to call embedded resources explicitly in JMeter?

12. Explain the function of timer (Timer) in JMeter?

【Network protocol】

1. The difference between Http and Https

2. What is the Http protocol stateless protocol? How to solve the Http protocol stateless protocol?

3. What are the commonly used HTTP methods?

4. HTTP request message and response message format

5. The 7 steps that a complete HTTP request goes through

6. The model and concept of TCP/IP

7. How to test whether the network is connected

8. How to let the external network access the terminal at home? What is its principle?

9. What are the processes of visiting a website?

[ Test actual combat interview questions]

I have a program now, and it runs very slowly on Windows. How can I tell whether it is a problem with the program or a problem with the software and hardware system?

1. Check whether the system has the characteristics of poisoning

2. Check whether the software/hardware configuration meets the recommended standards of the software

3. Confirm whether the current system is independent, that is, it does not provide any external services that consume CPU resources

4. If it is 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 a problem with access.

5. When the system is not under any load, check the performance monitor to confirm the application's access to CPU/memory

Supplement: How to implement each step and what technology needs to be used

A program with n variables can generate several test cases using boundary value analysis

4n+1

Please design a test case about ATM automatic teller machine.

[MySQL database]

1. Talk about left join and right join.

2. Introduce what is an index.

3. Use sql to produce 100,000 pieces of data.

4. Give you a table and write sql according to the requirements.

5. To maintain the integrity and consistency of the database, do you like to use triggers or write business logic yourself? Why?

6. Query the student numbers and affiliations of students who have more than 5 elective courses?

Linux

1. What is your usual command?

2. What do you use to check the log?

3. How to find a file whose size exceeds 5M

4. How to check the process?

5. Compile the maven project

6. If the Xshell tool wants to upload or download files from the server, what package can be installed on the server?

7. Edit the start.sh file to view the contents of the first 10 lines and the last 10 lines of the file

【Programming questions】

1. Please write down the bubble sort.

2. The number of occurrences of the number 3 in the sequence of 1~9999. Solve it by recursion.

3. Find the first 4 largest numbers from an array and use the optimal solution.

4. Write a program to delete the string b contained in the string a. For example, input a = "asdw", b = "sd" to return the string "aw", and test this program.

5. Write a method to convert a string to a number, such as str="1234", to int 1234. and test the program.

6. Given an integer array nums and a target value target, please find the two integers whose sum is the target value in the array, and return their array subscripts.

【HR interview questions】

1. Self introduction and work experience introduction?

2. What is your career development direction or career plan in three to five years?

3. What qualities do you think testers need to possess?

4. Why are you able to do this line of testing?

5. What do you think about the company's overtime problem? Do you work overtime on Saturdays and Sundays?

6. Why did you choose the software testing industry?

7. What do you think are the advantages of applying for this job?

8. What salary do you expect?

9. What kind of person do you think is the most difficult to get along with?

 

Finally, I would like to thank everyone who has read my article carefully. Reciprocity is always necessary. Although it is not a very valuable thing, you can take it away if you need it:

These materials should be the most comprehensive and complete preparation warehouse for [software testing] friends. This warehouse has also accompanied tens of  thousands of test engineers through the most difficult journey, and I hope it can help you! Partners can click the small card below to receive 

Guess you like

Origin blog.csdn.net/okcross0/article/details/130344374