Received 6 offers in 10 days, summary of interface test interview questions (frequently asked questions + answers)


Preface

1. Please introduce how you do testing based on the projects you are familiar with?

First of all, you must be familiar with the project yourself, familiar with the project requirements, project organizational structure, project R&D interface, etc.
How are functions + interfaces + automation + performance handled?

Step 1: Conduct demand analysis, demand review, R&D and testing to reach a unified understanding of the requirements.
Step 2: Architects will output interface specifications; front-end and back-end developers develop based on interfaces; functional testers begin to design test cases based on requirements; Interface testers design test interface test cases based on interface specifications

Step 3: Back-end development tests the interface first;
Step 4: Interface testers test the interface;
Step 5: After the interface test passes, output the test report of the interface;
Step 6: Functional testers, based on the test of the interface After reporting and testing of front-end development, functional testing begins. Interface testers organize interface automation scripts and begin interface testing in the acceptance environment;

Part 7: After the functional tester passes the test environment test, he or she enters the acceptance environment for functional acceptance testing. The
UI automation team members start writing the code for the automated UI testing of the regression test;

Step 8: Publish to the online environment and conduct the final round of functional regression testing;
Step 9: Track the occurrence of BUGs;

2. How does your company do interface testing?

Answer: In my previous company, I conducted interface testing on the HRM human resources system. I was responsible for the hub, employee additions and deletions, department additions and deletions, and user resource query interface testing. There were 12 interfaces in total.

When I carry out testing in the company, I first conduct needs analysis, and then when developing code, I am familiar with the project requirements. After waiting for the development to submit the test interface, get the interface document, then design test cases based on the interface document, and use the postman tool to conduct interface testing.

After three days of testing, a round of interface testing can generally be completed. After the test is completed, if all test cases have been executed, and all bugs have passed the regression test, and there are no serious bugs, functional testing can be handed over.

When functional testers perform functional testing, we can write automated interface test code and then perform regression testing on the interface layer.

At the same time, our interface testers will conduct deployment and regression testing in the UAT acceptance environment in advance. After the UAT regression is passed, the front-end test can intervene in the UAT test.

After the front-end test design is passed and released online, we can use continuous integration technology in the UAT environment to continuously monitor the quality of the released version to ensure the quality of the project.

Finally, we used interface testing to test the system interface layer of the human resources management system. The testing efficiency was 16 times higher than the functional testing regression efficiency.

Functional testing takes a day to complete regression testing. Our interface staff used automated interface testing technology and it only took half an hour. It can also continuously monitor the code quality of old versions and improve our testing efficiency.

If the interviewer does not interrupt, he will continue:
Here, we use Postman's assertions to associate and introduce external data files to test the interface. And use the newman tool to generate HTML reports, use mysql to connect to the database, and verify the database data.

Among them, for some big data test scenarios, we use csv files to complete the test.

Impressive bug:
At work, I encountered some bugs that impressed me. When I was testing the login interface, I accidentally discovered that we did not enter the user name and entered a specific password. The login was successful, and then let I realized that this was a backdoor, so I submitted a ticket and asked the development why there was such a problem. Finally, the development said that it was a piece of dirty data inserted into the database. This data did not have a username and then a password. They would fix it. .

Interview suggestions:
It is best to take charge of the interview and control the questions asked by the interviewer. (It is often difficult to control if he is prepared)

There are three types of questions that the interviewer will definitely ask: the technology written in your resume; the technology used in the company, and expanded knowledge (beyond the interviewer’s personal knowledge, these are all things we don’t know during the interview)

The interview questions are essentially how we do it

For example: Do you know the HTTP protocol code?
This question is not asking you whether you know the HTTP protocol, but what is the HTTP protocol, what are its characteristics, and what are its components?

Have you ever written test cases?
I once designed interface test cases for the login interface. I designed login test cases based on the test methodology equivalence classes and boundary values. I designed a total of 46 test cases. The main key elements are the test name, operation steps, severity level, and expectations of the use case. results in these parts.

3. Is the work of interface testing and UI testing duplicated?

Answer: There are repeated scenarios for interface testing and functional testing. If the interface and UI testing are completely separated, there will be no duplication.

Interface testing and functional testing are repetitive in business logic. However, interface testing pays more attention to back-end interaction, while functional testing can focus on front-end UI interaction. In this way, each has its own focus and can better manage the test.

However, in the current industry, many companies basically conduct interface testing through functional testing. Sometimes interface testing is omitted, but this risk is relatively high. Functional testing cannot cover the performance and security test points in thick interface testing, resulting in Insufficient testing and high risk of launch.

4. How to build the interface testing framework?

Answer: Our formula uses the framework python+unitest + request + parameterized + HTMLTestRuuner +pymysql to test the interface.
Among them, unitest is mainly used to manage test cases;
the requests module is used to send interface requests and encapsulate interfaces;
parameterized is used for parameterization;
HTMLTestRunner is used to generate test reports;
pymysql operates the database;

In our interface framework, we first create a new project, then build the directory structure required by the project, and then install the framework using toolkits such as requests, parameterized htmltestrunner pymysql

Writing scripts will call the encapsulated interface to perform interface testing. Finally, run_suite.py generates the test report. The report directory is used to store test reports, and utils stores custom modules.

Self-introduction should be concise and organized

5. How to deal with dependencies between interfaces?

Answer: You can use association. When I was doing interface testing on the human resources management system in my company, the login and employee management modules had dependencies. After I encountered them, I used the postman tool to first get the response of the previous interface and then save it. to global variables, and then call the saved variables in the next interface to achieve association to resolve dependencies between interfaces.

The code implementation also saves the value in the response message as a variable and calls it in the next interface.

6. How to determine whether the interface test result is successful or failed?

Assert whether the data returned by the interface is consistent with expectations;
if you need to update the data in the database, you need to query the database to see if the data is consistent with the modification;
after the modification is completed, you need to query the database to see if it can be queried normally;

7. How often are automated tests built?
Build twice a day

8. What is the difference between using tools and code to implement automated testing of interfaces?

Answer:
Tool: simple to use, but inflexible, can be used to test some non-customized requirements
Code: very flexible, can be customized

9. What is the difference between cookie and session?

cookie – the client session technology cookie is stored on the client, and carries the cookie to request the server;
session – the server session technology sessionID is stored on the server, and carries the sessionID to request the server;
token – the token token is stored on the client and carries the token to request the server;

10. How to locate front-end and back-end bugs? (important)

Question: After modifying the parameters, there is no response when clicking submit. At this time, how to locate the front-end or back-end problem?

Use fidder to capture the packet:
see if the front-end sends the correct request message. If it does not send or sends the wrong request message, it is a front-end problem;
if the correct request message is sent: but the server does not return the corresponding data, then It is a server-side problem;
if a correct request message is sent and the server responds but the response is wrong, this is still a server-side problem;
if a correct request is sent and the server responds and the response is correct, this is a problem in the previous section;

The following is the most comprehensive software testing engineer learning knowledge architecture system diagram in 2023 that I compiled.

1. Python programming from entry to proficiency

Please add image description

2. Practical implementation of interface automation projects

Please add image description

3. Web automation project actual combat

Please add image description

4. Practical implementation of App automation project

Please add image description

5. Resumes of first-tier manufacturers

Please add image description

6. Test and develop DevOps system

Please add image description

7. Commonly used automated testing tools

Please add image description

8. JMeter performance test

Please add image description

9. Summary (little surprise at the end)

Difficulties are not the end, setbacks are not the end, and struggle is the only way to success. Hold dreams in your heart, burn passion, set sail, constantly surpass yourself, move forward unyieldingly, water your growth with sweat, bloom your own light, and create a brilliant life.

Life is meaningful because of struggle, and persistence is sincere because of struggle. No matter how tortuous the road ahead is, only by working hard can you write your own glorious chapter. Believe in your own strength, never stop chasing your dreams, and move forward bravely, and you will eventually gain unlimited possibilities in life!

Every effort is paving the way for your future self, and every bit of hard work is igniting the fire in your heart. No matter what difficulties you encounter, persevere in your struggle, move forward courageously, let your sweat water your growth, let your dreams bloom in your struggle, and achieve a brilliant life.

Guess you like

Origin blog.csdn.net/m0_60054525/article/details/131898874