[Software testing interview] The most complete network, a summary of automated testing interview questions (with answers)


foreword

Interview question 1: Have you ever done automated testing?

Software testing interview questions: https://www.bilibili.com/video/BV1Lq4y137aR/

Answer:
I implemented web automated testing in the xx project. We built an automated testing framework technology in our project: python+selenium+pytest/unittest+ddt+jenkins, and then used the POM layered mode (object-oriented thinking), data-driven Using the drive mode of excel+ddt, I am responsible for the automatic code writing of those modules and test cases in this automated test implementation project

I implemented the interface automatic test platform construction in the xx project, technology stack: python+django+pytest+vue+ddt+jenkins

Interview question 2: How do you implement automated testing in the company?

1. The company is currently implementing automation, and I hope you can undertake the implementation process of automation.
2. The company is already implementing automation, and I want to learn from it

1) The feasibility analysis of the project team to do automation to what extent is the automation rate?
The project cycle is longer than one year, the requirements will not change frequently, and the automation script can be used continuously and repeatedly.
2) The automation tool selenium robotframework research and demo demonstration
3) By the leader Build an automated testing framework, and implement it step by step in the project, discover the problems of the framework and improve it
4) Process the automation, frame the use documents and specification documents
5) Generate customized reports and continue to improve the framework

Interview question 3: How do you deal with interface association in the interface automation testing framework?

How postman and jmeter handle interface association?

Answer:
json extractor, regular expression, cookie extractor

1. Save all associated fields through a separate extract.yaml file. The variable extracted in the middle is cleared before all test cases. Clear
through
unittest: setup_class
pytest: conftest+fixtrue
2. In the yaml of the test case, pass a The level keyword extract extracts the regular expression extraction that supports json extraction
3. In the yaml file of other interfaces, extract by {{}} or ${}

Interview question 4: Have you independently built an automated interface automated testing framework from scratch?

Answer:
The core technology used in the interface automation testing framework I built in the xx project:
request+pytest+allure+parametrize+jenkins
packaging: basepage basic packaging, testcase packaging...

Requests secondary encapsulation, log collection module yaml configuration file encapsulation

The rules of this packaged project:
YAML format use case conventions
1. Must contain a first-level keyword: name request validate
2. Under the request keyword, must include: method, url, data, if there is no data, then enter the default value {}
3 , To extract variables, use the first-level keyword extract. Support json extraction and regular extraction (.+?) and (.*?) values ​​using {}
4. You can use hot loading to call the methods in the debugTalk class in debug_talk.py by calling methods 5. Support equals and contains Kind of assertion 6. Use parameters as the data driver of the csv file, call the method through {} 5. Support equals and contains two kinds of assertions 6. Use parameters as the data driver of the csv file, passcall method 5 , support e q u a ls and con tain s assertion 6 , use param et ers as data driver of cs v file, and take values ​​in the format of csv ( appid )

Web and interface automation
More detailed:
web: how to handle frames, how to handle drop-down boxes, multiple pages, pop-up window operations, mouse operations (hovering), scroll bars, keyboards, how do you handle them Interface: interface encryption interface
signature

Interview question 5: How do you test in combination with a specific business scenario?

For example: Double Eleven coupons are available on the same day, 50% off when you spend 100, can’t you use special offers?

Literal test points for analyzing demand
1. Double 11 coupons are available on the day (boundary value)
2. Spend 100 minus 50 (boundary value)
3. Special offers cannot be used

Other scenarios
1. UI inspection: coupon amount. Coupons cannot be grayed out, and the valid time is displayed.
2. Coupon status: received and unused, received and used, used, and refunded after use.
3. Check whether coupons can be automatically selected and whether they are combined with other coupons Superimposed use, smart selection of the largest coupon, and coupon selection switching
4, the return amount of the product purchased using coupons in the return scene, and whether the coupon is refundable
5, whether the coupon can be received repeatedly, etc.

Interview question 6: How to distinguish front-end and back-end bugs?

Capture the packet to see the front-end parameters and compare the data returned by the back-end.
You can also analyze the background log
...
First eliminate the factors caused by test environment problems or misuse, and then follow the same steps to reproduce it. If it cannot be reproduced, directly copy the previous The screenshot of the log is for development.

If it reappears, you can use the packet capture tool to see the request and response data. If the request is wrong, it is the front-end problem. If the response is wrong, it is the back-end problem.

You can also look at the status code. Generally, if it starts with 4, it is a client problem. For example, if it is 401, it means unauthorized, 403 means access is forbidden, and 404 means page not found. 5 is the problem of the server, such as 500 is an internal server error

Interview question 7: How to achieve distributed test architecture and use case concurrency?

However, any system related to the distributed test architecture is generally based on UI automation. SeleniumGrid is a particularly easy-to-use distributed architecture deployment service.

The current mainstream distributed testing framework deployment is based on the master-slave node form. Configure a gateway + N child nodes to implement a distributed architecture

Use case concurrency is recommended to use multi-threaded mode to achieve
Jenkins' own distributed deployment mode is also based on master-slave nodes

Interview question 8: How to implement POM automated testing architecture?

How to solve the development of automation work under a multi-person team: Architecture
Define the test framework structure:
base class, page object class, test case, test data, configuration, function...

Interview question 9: How is the framework designed? How is the framework designed?

Technology:
keyword-driven + data-driven

Secondary encapsulation of commonly used operation behaviors to generate a custom keyword class, and put all encapsulation functions in the class for subsequent calls

Prioritize the Excel data drive, combine the Python launch mechanism + openpyxl module to realize the reading and execution of the excel data content, and define the test case format of the standardized Excel file

Combined with log information configuration, framework test environment configuration, server configuration, data file reading path configuration, public parameter configuration, etc. to carry out detailed R&D management of configuration modules

Re-optimization considers the implementation of use case management based on Unittest/Pytest and defines the driving parameters for data reading

Integrate HTMLTestRunner or Allure test report, inherit mail, integrate Jenkins to realize automated test construction

Technical implementation of distributed test framework deployment + concurrent implementation of use cases

POM test framework implementation

Common bugs in interface testing

1. Improper handling of special values ​​will cause the program to crash when it exits abnormally (the express information user does not fill in the submission)
2. Type boundary overflow leads to inconsistent data reading and writing (the value checked by the list query does not match the actual number of items)
3. Value A correct error message is not returned outside the boundary value.
4. If the permission is not processed, other user information can be accessed (report export requires role permission, and everyone can see it)
5. If the logic check is not perfect, loopholes can be used to obtain illegitimate benefits (The inflow and outflow of the cash account is frozen and unfrozen)
6. Improper handling of the status leads to a logic error (the order status is unpaid, pending payment, payment has been cancelled, payment is pending refund, and the refund has been cancelled) 7.
When the number of items in the array type is 0 or the item is repeated Program exited abnormally

Continue to update

The following is the most complete software test engineer learning knowledge architecture system diagram in 2023 that I compiled

1. From entry to mastery of Python programming

Please add a picture description

2. Interface automation project actual combat

Please add a picture description

3. Actual Combat of Web Automation Project

Please add a picture description

4. Actual Combat of App Automation Project

Please add a picture description

5. Resume of first-tier manufacturers

Please add a picture description

6. Test and develop DevOps system

Please add a picture description

7. Commonly used automated testing tools

Please add a picture description

Eight, JMeter performance test

Please add a picture description

9. Summary (little surprise at the end)

Life is like a marathon, only by running persistently can we reach the finish line. Go forward with faith, never give up. As long as you work hard, success will not be too far away.

Dreams are more than the present, there are still distant places waiting to be conquered. As long as you don't give up and persevere, even if the journey is difficult, you can break out of the cocoon and become a butterfly, blooming with glory. Let us work together to create our own brilliance!

Life is too short, don't waste it on meaningless things. Grasp every day, move forward firmly, and constantly surpass yourself. At any time, maintain passion and enthusiasm, fight to the end, pursue your dreams, and make life full of meaning.

Guess you like

Origin blog.csdn.net/shuang_waiwai/article/details/130268170