Golden Nine and Silver Ten, a collection of software testing interview questions (with answers)

foreword

I saw some interview questions before, and I always feel that they will be useful, but I can’t remember them after reading them again and again, so I integrated all the interview questions together, which are all shared by big guys from all walks of life. Swipe, no need to look for questions everywhere, and share these interview questions that I have sorted out today. At the same time, I have also prepared a software testing video tutorial for everyone, just below, you can watch it directly if you need it, or you can directly click on the small card at the end of the article to get the information document for free

Watch free video tutorials at:

[Software Test] Use 300 interview questions to help you log in, brush it once a day, let you directly enter the job, and get your favorite offer_哔哩哔哩_bilibili [Software Test] use 300 interview questions to help you log in, brush it once a day, let You directly join the job and get a total of 200 videos of your favorite offer, including: Interview explanation 1——Meituan Zhenti 1—Given a scenario, talk about your test case design ideas, a complete set of software testing materials and learning routes, interview explanation 2—— Meituan Zhenti 2 - Let’s talk about the difference between session and token verification, etc. For more exciting videos from the UP master, please follow the UP account. https://www.bilibili.com/video/BV1SY4y1p7k6/?spm_id_from=333.999.0.0&vd_source=74d0257ec7066cc4f9013524f0bb7013

1. 30 questions for JD software testing post interview (dry goods)

1. What are the common design methods of test cases for black box testing? Please use specific examples to illustrate the application of these methods in the design of test cases.

1) Equivalence class division: An equivalence class refers to a subset of an input field. In this subset, each input data is equivalent to revealing errors in the program. It is reasonable to assume that: testing a certain equivalence The representative value of a class is equal to the test of other values ​​of this class. Therefore, all input data can be divided into several equivalence classes reasonably, and one data in each equivalence class is taken as the input condition of the test, and a small amount of Representative test data. Get good test results. Equivalence class division can have two different situations: valid equivalence class and invalid equivalence class.

2) Boundary Value Analysis: It is a supplement to the equivalence class division method. Test work experience tells me that a large number of errors occur on the boundary of the input or output range, rather than inside the input and output range. Therefore, designing test cases for various boundary conditions can detect more errors.

To design test cases using the boundary value analysis method, the boundary conditions should be determined first. Usually, the boundaries of the input and output equivalence classes are the boundary conditions that should be focused on testing. Values ​​that are exactly equal to, just greater than or just less than the boundary should be selected as test data, Instead of selecting typical values ​​or arbitrary values ​​in the equivalence class as test data.

3) Error guessing method: based on experience and intuition to speculate on all possible errors in the program, so as to design test cases in a targeted manner.

The basic idea of ​​the error guessing method: List all possible errors and special cases that are prone to errors in the program, and select test cases based on them. For example, many common errors in modules have been listed during unit testing. Previous products The errors found in the test, etc., these are the summary of experience. In addition, the input data and output data are 0. The input form is blank or the input form has only one line. These are the situations that are prone to errors. You can choose these situations The following example is used as a test case.

4) Cause-and-effect diagram method: The equivalence class division method and boundary value analysis method introduced above both focus on considering the input conditions, but do not consider the relationship between the input conditions, mutual combination, etc. Considering the mutual combination of the input conditions, Some new situations may be generated. But it is not an easy task to check the combination of input conditions. Even if all input conditions are divided into equivalence classes, there are quite a lot of combinations among them. Therefore, it is necessary to consider adopting a suitable To describe the combination of various conditions, correspondingly generate multiple actions to consider the design of test cases. This requires the use of causal diagrams (logic models). The final result of the causal diagram method is the decision table. It is suitable for checking program input conditions of various combinations.

5) Orthogonal table analysis method: It may cause a surge in the number of test cases due to the combination of a large number of parameters. At the same time, these test cases have no obvious gap in priority, and testers cannot complete such a large number of tests. , some use cases can be reduced through the orthogonal table, so as to achieve the possibility of covering as large a range as possible with as few use cases as possible.

6) Scenario analysis method: It refers to simulating the user's operation steps according to the user scenario. This is similar to the cause-and-effect diagram, but the depth and feasibility of execution may be better.

7) State diagram method: Get all states of the system under test through input conditions and system requirements description, and obtain output conditions through input conditions and states; obtain test cases of the system under test through input conditions, output conditions and states.

8) Outline method: The outline method is a method that focuses on requirements. In order to list various test conditions, the requirements are converted into an outline. The outline is represented as a tree structure with a unique path between the root and each leaf node. Each path in the outline defines a specific set of input conditions used to define test cases. The number of leaves in the tree or paths in the outline gives the approximate number of test cases needed to test all functionality.

2. Describe in detail the complete process of a test activity. (For reference, this answer is mainly the practice of the waterfall model)

The project manager communicates with the customer to complete the requirements document, and the developers and testers jointly complete the review of the requirements document. The content of the review includes: where the requirements description is unclear and where there may be obvious conflicts or unrealizable functions. The project manager completes the project plan by integrating the opinions of developers, testers and customers. Then SQA enters the project and starts doing statistics and tracking

The developer completes the requirement analysis document according to the requirement document, and the tester conducts a review. The main content of the review includes whether there are omissions or differences in understanding between the two parties. The tester completes the test plan document, and the content included in the test plan is described above.

Testers start to write test cases according to the modified requirements analysis document, and developers complete the outline design document and detailed design document. These two documents become supplementary materials for testers to write test cases.

After the test cases are completed, testing and development needs to be reviewed.

The tester builds the environment

The developer submits the first version, and there may be unfinished functions that need to be explained. Testers conduct tests and submit to BugZilla after finding bugs.

The development submits the second version, including Bug Fix and some functions added, and the testers conduct testing.

Repeat the above work, generally after 3-4 versions, the number of BUGs will decrease, and the requirements for shipment will be met.

If there are problems reported by customers, testers are required to assist in reproducing and retesting.

3. The tracking process of BUG management tools (using BugZilla as an example)

The tester finds the BUG, ​​submits it to Bugzilla, the status is new, and the receiver of the BUG is the development interface personnel

The development interface assigns the BUG to the developer of the relevant module, and the status is changed to assigned. The developer and the test confirm the BUG. If it is my own BUG, ​​it is set to receive; if it is another developer's problem, it is forwarded. It is up to the next developer to carry out this behavior; if it is not a problem, you need to discuss and confirm it, reject this BUG, ​​and then the tester closes this problem.

If the developer accepts the BUG and modifies it, change the status of the BUG to fixed, and inform the version in which the test can be tested.

Testers test in the new version, and if they find that the problem still exists, they will refuse to verify; if it has been fixed, they will close the BUG.

4. In your opinion, in the process of communication between testers and developers, how to improve the efficiency and effect of communication? What is the key to maintaining good interpersonal relationships between testers and other members of the development team?

Try to communicate face-to-face, and secondly, communicate directly by phone. If you can only communicate through non-timely communication tools such as Email, emphasize the need to have a deep understanding of the characteristics and be able to express clearly.

It is also more effective to use some test management tools such as TestDirector for management. At the same time, it should be noted that there is an accurate description of BUG in TestDirector.

Pay attention to the following points in establishing good communication between testers and developers in the team:

One is sincerity, the other is team spirit, the third is to have a common language in the profession, and the fourth is to be right about things and not people, work first

Of course, you can also increase the other party's favor by directly pointing out some minor problems instead of entering the BUG Tracking System.

5. Where is your greatest interest in testing? Why?

There is no fixed and unified answer to this interview question, but it may be asked by many companies. Provide the following answers for consideration:

The greatest interest, feeling that this is a challenging job;

Testing is an experience industry. The longer you work, the more difficult and fun it will be to do a good job in testing.

Through your own work, you can make software products more and more perfect, and experience the fun from it

Pay attention to the following points when answering these questions:

Express your interest by matching the technical route of the recruiting company as much as possible. For example, if the company is a database application company, then express your interest in database testing and hope to improve your database mastery through testing.

Indicate that the purpose of your testing is to improve your ability and to do a better job of testing; improving your ability is not for future development or other things, unless the employer has such an arrangement.

Don't express your interest too much outside the scope of the recruiting company. For example, the recruiting company is doing financial software, but you have shown interest in game software; or the recruiting company is doing JAVA development, but your interest is in the development of C language programs.

6. What do you think are the advantages of testing?

There is no fixed answer to this interview, but you can refer to the following points and combine your own characteristics:

Resilient, patient, organized, likes to face challenges, has the confidence to do everything well, strong communication skills, good comments from previous managers show that I am doing well

7. Briefly describe what you have done in your previous work and what you are familiar with. The reference answer is as follows.

My main job in the past was system testing and automation testing. In the system test, the business logic function of the BOSS system and the Class 5 characteristics of the softswitch system are mainly tested. In the performance test, the stress test is mainly carried out, and the system response time and system resource consumption are obtained in the case of different numbers of requests. Automated testing is mainly to test the characteristics of the softswitch through the combination of self-written scripts and some third-party tools.

In testing, I feel that a completely accurate understanding of user needs is very important. In addition, the management of BUG should be based on requirements, not all BUGs need to be modified.

The testing work requires patience and meticulousness, because in the new version, although most of the originally discovered BUGs have been fixed, the original correct functions may also become incorrect. So pay attention to iterative testing and regression testing.

8. What is the use of static in C/C++? (Please specify at least two)

1) In the function body, a variable declared as static maintains its value while the function is called.
2) Inside the module (but outside the function body), a variable declared as static can be accessed by functions used in the module, but cannot be accessed by other functions outside the module. It is a local global variable.
3) In a module, a function declared as static can only be called by other functions in this module. That is, the function is restricted to the local scope of the module in which it is declared

9. What is the difference between a reference and a pointer?

1) References must be initialized, pointers do not.
2) After the reference is initialized, it cannot be changed, and the pointer can change the pointed object.
3) There is no reference to null, but there is a pointer to null.

10. Which network protocol does the Internet use? The main hierarchy of the protocol? What protocol is used for Internet physical address and IP address translation?

The main hierarchical structure of the TCP/IP protocol is: application layer/transport layer/network layer/data link layer.

ARP (Address Resolution Protocol) (Address Resolution Protocol)

11. Tell me about your understanding of the two strategies of top-down integration and bottom-up integration in integration testing, and talk about their respective advantages and disadvantages and which type of testing they are mainly suitable for;

top-down integration

Advantages: The main control and judgment points are verified earlier; a complete software function can be realized and verified first according to the depth first; the function is verified earlier, which brings confidence; only one driver is needed, reducing the cost of driver development; support fault isolation .

Disadvantages: The amount of development of the column is large; the underlying verification is delayed; the underlying components are not sufficiently tested.

The product control structure is relatively clear and stable; the high-level interface changes little; the low-level interface is undefined or may be modified frequently; the production and port control components have high technical risks and need to be verified as soon as possible; hope to see the system of the product as soon as possible functional behavior.

bottom-up integration

Advantages: verify the behavior of the underlying components earlier; the work can be initially integrated in parallel, which is more efficient than top-down; reduces the workload of the stub; supports fault isolation.

Disadvantages: The development workload of the driver is heavy; the verification of the high level is delayed, and design errors cannot be found in time.
The underlying interface is relatively stable; the high-level interface changes frequently; the underlying components are completed earlier.

12. Software acceptance testing includes formal acceptance testing, alpha testing, and beta testing.
13. There are many strategies for system testing, including performance testing, load testing, strength testing, usability testing, security testing, configuration testing, installation testing, document testing, failure recovery testing, user interface testing, recovery testing, and distribution testing. testing, usability testing.
14. The project documents that need to be referred to when designing a system test plan include software test plan, software requirement artifact, and iteration plan.
15. The steps to write a test case by drawing a cause-and-effect diagram are ___, ___, ___, ___ and converting the cause-and-effect diagram into a state diagram. There are five steps. The basic steps to generate test cases using cause and effect diagrams are:

§ Analyze software specification descriptions, which are causes (that is, input conditions or equivalent classes of input conditions), and which are results (that is, output conditions), and assign an identifier to each cause and result.

§ Analyze the semantics in the software specification description, find out what is the corresponding relationship between the cause and the effect, and between the cause and the cause? According to these relationships, draw a cause-and-effect diagram.

§ Due to grammatical or environmental constraints, some combinations of causes and causes and between causes and effects are impossible. To indicate these special cases, constraints or restrictions are marked on the causal diagram with symbols. § Convert cause-and-effect diagrams into decision tables.

§ Take each column of the judgment table as a basis and design test cases.

16. Please tell me who these tests are best done by, and what are they testing?

Code and function-level testing is generally done by white-box testers, who check the correctness of each piece of code or function to check whether it correctly implements the specified functions.

The main basis for module and component level testing is the integration and calling relationship between program structure design and test modules, which is generally completed by testers.

System testing is performed on the basis of module testing and unit testing. Understand system functions and performance, and conduct comprehensive tests based on test cases.

17. What aspects should be considered when designing test cases, that is, which aspects are tested by different test cases?

When designing test cases, it is necessary to pay attention to not only the overall process and functions, but also strength testing, performance testing, stress testing, boundary value testing, stability testing, security testing and other aspects. (The four basic elements that need to be considered in the test case are input, output, operation and test environment; in addition, the test case needs to consider the type of test (function, performance, security...), this part can be answered by referring to TP. In addition, Importance and priority of use cases also needs to be considered)

18. When saving a text file under Windows, a save dialog box will pop up. If a test case is created for the file name, how should the equivalence class be divided?

Single-byte, such as A; double-byte, AA, I I; special character /'. ';, =-, etc.; reserved words, such as com; the file format is in 8.3 format; the file name format is not in 8.3 format; nine special characters such as /,, *.

19. Assuming that there is a text box that requires the input of a 10-character zip code, how should the text box be divided into equivalence classes?

Special characters, such as 10 * or ¥; English letters, such as ABCDefghik; less than ten characters, such as 123; more than ten characters, such as 11111111111; numbers and other mixed, such as 123AAAAAAAA; empty characters; reserved characters

20. When did the software testing project start? Why?

Software testing should be involved in the requirements analysis stage, because the object of testing is not only program coding, but all products generated during the software development process should be tested, and software defects tend to amplify. The later a defect is found, the more it will cost to fix it the greater the cost.

21. What is regression testing?

Regression testing: (regression testing): There are two types of regression testing: use case regression and error regression; use case regression is to go back and retest the previously used use cases after a period of time to see if the problem will be found again. Bug regression is a method of re-verifying the defects that appeared and repaired in the previous version in the new version, and testing the relevant modified parts with the defects as the core.

22. What is the focus of unit testing, integration testing, and system testing?

Unit testing is aimed at the smallest unit of software design - program modules (functions and procedures in process-oriented; classes in object-oriented). The testing work for correctness checking is to find possible errors that may exist inside each program module. Generally, there are two steps: manual static inspection \ dynamic execution tracking
integration test is aimed at the inspection of components integrated by each module that has passed the unit test, and its main content is the interface between each unit module and The realized function.
The system test is aimed at the integrated software system. As an element of the whole computer system, it is combined with other system elements such as computer hardware\peripherals\some supporting software\data and personnel. A series of integration tests and confirmation tests are carried out on the computer system in the operating environment.

23. What qualities should a test engineer possess?

1. Responsibility 2. Communication skills 3. Teamwork spirit 4. Patience, carefulness, confidence 5. Always maintain a skeptical attitude and have awareness of defect prevention 6. Have certain programming experience

24. What types of software testing do you know, and briefly introduce them.

Classified by testing strategy: 1. Static and dynamic testing 2. Black box and white box testing 3. Manual and automatic testing 4. Smoke testing 5. Regression testing;

Classified by testing phase: unit testing, integration testing, system testing;

Other common testing methods: 1. Functional testing 2. Performance testing 3. Stress testing 4. Load testing 5. Usability testing 6. Installation testing 7. Interface testing 8. Configuration testing 9. Documentation testing 10. Compatibility testing 11. Security test 12, recovery test

25. What do you think is the key to doing a good job in test planning?

Clarify the goal of the test and enhance the practicability of the test plan

The important purpose of writing a software test plan is to enable the testing process to discover more software defects, so the value of a software test plan depends on its ability to help manage test projects and find out potential software defects. Therefore, the test scope in the software test plan must highly cover the functional requirements, the test methods must be practical, the test tools must be highly practical, easy to use, and the test results generated are intuitive and accurate

Adhere to the "5W" rules, clarify the content and process

The "5W" rule refers to "What (what to do)", "Why (why do it)", "When (when to do it)", "Where (where)", "How (how to do it)". Using the "5W" rule to create a software test plan can help the test team understand the purpose of the test (Why), clarify the scope and content of the test (What), determine the start and end date of the test (When), and point out the methods and tools of the test ( How), giving the storage location of test documents and software (Where).

Adopt a review and update mechanism to ensure that the test plan meets actual needs

After the test plan is written, if it has not been reviewed, it will be sent directly to the test team. The content of the test plan may be inaccurate or omit the test content, or the test scope may increase or decrease due to changes in software requirements, and the content of the test plan is not updated in time, which is misleading. Test executive.

Create test plan and test detailed specification, test case respectively

The detailed test technical indicators should be included in the independently created test detailed specification document, and the test cases used to guide the test team to execute the test process should be placed in the independently created test case document or test case management database. There is a strategic and tactical relationship between the test plan and the test specification and test cases. The test plan mainly plans the scope, method and resource allocation of the test activity from a macro perspective, while the test specification and test cases are the specific tactics for completing the test task.

26. What do you think is the key to doing a good job in test case design?

The key to white-box test case design is to cover as many internal program logic results as possible with fewer test cases

The key to black-box use case design is also to cover module output and input interfaces with fewer use cases. Impossible to fully test to find the most problems in a reasonable amount of time with the fewest use cases

27. What is your testing career development goal?

The more testing experience, the higher the testing ability. So my career development needs time to accumulate, step by step toward a senior test engineer. And I also have a preliminary career plan, accumulating testing experience in the first 3 years, constantly updating and correcting myself, and doing a good job in testing tasks.

28. What is the standard for the end of the test?

From a microscopic point of view, it is defined in the test plan. For example, the system runs smoothly for 72 hours under a certain performance. Currently, in the Bug Tracking System, there are no general serious bugs in this version. The number of common bugs is less than 3, and the bug repair rate is 90%. The above parameters and so on, and then the development manager, test manager, and project manager will sign to agree to the version Release.

If we talk about the macro, the test will end when the software completely disappears.

29. What stages should a complete set of tests consist of?

Feasibility analysis, requirements analysis, general design, detailed design, coding, unit testing, integration testing, system testing, acceptance testing

30. Do you know the software development process of the companies you worked in the past? If so, please describe what work needs to be done in a complete development process? What are the different roles to accomplish these tasks? What specific tasks have you worked on in your previous testing jobs? Which part of the job are you best at?

Development process—requirements research (requirements personnel), requirements analysis (requirements personnel), outline design (designers), detailed design (designers), coding (developers)

Test process—requirements review, system test design, summary design review, integration test design, detailed design review, unit test design, test execution

Have done the whole process of testing work, good at test design

The process determines the quality, and the software process improvement is just to improve the quality of the software, and to accumulate various past experiences and lessons.

2. The classic interview questions of software testing are all here, and the first 5 questions must be asked

Question 1: Why did you choose the industry of software testing?

Answer: I chose software testing as a career because I love software testing. I think software testing is a more challenging and creative profession than software programming. (Don't say that you choose to do software testing because you can't continue to develop, and don't say that you don't like typing code)

Question 2: Tell me about your understanding of software testing?

Answer: Software testing is the process of verifying software functionality and producing a software product of good standard without defects, bugs and malfunctions.

Question 3: What is the test log?

Answer: The test log contains a complete list of operations performed during software testing, and from the test log you can know whether the test passed or failed.

Question 4: What is the difference between manual testing and automated testing?

Answer: Manual testing is performed manually by the user and automated testing is done automatically with the help of pre-scripts. Automated testing is faster, safer, and cost-effective, while manual testing is slower and less secure.

Question 5: What is the difference between white box and black box testing?

Answer: White box testing is a software testing method in which the user must know the realization of the internal structure, while in black box testing, the user does not need to know the internal working modules of the user. In white box testing, the user should have programming skills whereas in black box testing, the user does not need programming skills.

Question 6: What are the benefits of black box testing?

Answer: Black box testing can be done by users with little programming knowledge and is much faster than white box testing process. Few errors may result in a software product because every component and module of the software has not been tested.

Question 7: What are the advantages of white box testing?

Answer: White box testing ensures a higher quality software product as each component is tested by the programmer. This is a lengthy process that takes more time than black box testing.

Question 8: What is regression testing?

A: When software is changed or modified, retest to check that software functions are working properly and to ensure that there are no unintentional bugs in the software. This testing process is called regression testing.

Question 9: What is functional testing?

A: Functional testing is a testing and verification process against customer specifications and fulfills all customer requirements.

Question 10: What is the relationship between test cases and test scripts?
 

Three, software testing common interview questions

1. What are the stages of the test?

Generally divided into five stages: unit testing, integration testing, confirmation testing, system testing, acceptance testing.

2. What are the software testing methods?

Black box, white box, gray box.

3. The difference and use of sum and count in the database

General interviews will use sum and order by group together
count: count the number of data records you query: select count(*) from student table;
sum: sum: select sum(chengji) from student table where name='张three';

4. Design a module test case

Investigate whether the interviewer's experience, use case design ability, thinking, and mastered testing methods are comprehensive.
Analyze from the aspects of functional testing, interface testing, exception testing, performance, and security testing

5. How does pytest manage test cases?

Master the case rules, such as starting with test, class named after Test, etc.
How to execute a single py case file, how to manage multiple folders

6. Why did you choose the software testing industry?

Because I knew about the software testing industry before, I think his development prospects are very good.
(Don't say that you just switch to testing when you can't do development!)

7. What are the types of software testing?

Test types include: functional test, performance test, interface test

8. What is a test case, what is a test script, and what is the relationship between the two?

A specific set of input data, operation or various environmental settings and expected results provided to the system under test for the implementation of the test.
Test scripts are scripts written for automated testing.
The writing of test scripts must correspond to the corresponding test cases

9. How to write test plan and test cases?

To be simple, the test plan should include detailed test strategies and test methods, reasonable and detailed resource arrangements, etc. As for test cases, it depends on whether the requirements (including functional and non-functional requirements) are refined to functional points and whether they can be tested wait.

10. What is the strategy for software testing?

Software testing strategy: under the guidance of certain software testing standards and test specifications, the collection of principles, methods and methods of software testing stipulated according to the specific environmental constraints of the test project.

Common written test questions for software testing:

True or False (Y=Yes, N=False)

1. The purpose of software testing is to find as many software defects as possible. (Y)

2. Beta testing is a kind of acceptance testing. (Y)

3. Acceptance testing is performed by the end user. (N)

4. Testers do not need to submit any artifacts before the project is approved. (Y)

5. Unit testing can find about 80% of software defects. (Y)

6. Code review is to check whether the source code meets the requirements of the module design. (N)

7. Bottom-up integration requires testers to write drivers. (Y)

8. Load testing is to verify the highest level of capability of the system to be tested. (N)

9. Testers must adhere to the principle, and the defect will not be passed if the defect is not repaired. (N)

10. Code reviewers are generally served by testers. (N)

11. We can artificially make the software configuration problem free. (N)

12. The integration test plan is submitted at the end of the requirements analysis phase. (N)

multiple choice

1. Among the following logic coverage testing methods, the one with the strongest coverage ability is (D)

A.Statement coverage b. Judgment coverage C. condition coverage d. Condition combination coverage

2. Regarding the difference between black-box testing and white-box testing, which of the following statements is correct (A)

A.White-box testing focuses on program structure, while black-box testing focuses on functionality
B. White box testing can use automatic testing tools, but black box testing cannot use tools. 100 intensive lectures on test questions
C. White-box testing requires the participation of developers, while black-box testing does not
. Black box testing is more widely used than white box testing

3. Regarding the representation of the status code in the HTTP protocol, which of the following statements is wrong (D)

A.1**: Indicates client error
B.2*: Indicates that the request was successfully received *
C. 3**: Indicates that the request is completed, and the customer needs to further refine the request
D. 4**: Indicates server error

4. In Linux. To unpack bugzilla.tar.gz and report in detail the filenames processed by the tar command, the command (A) should be used

A.tar –xvzf bugzilla.tar.gz B.tar –cvzf bugzilla.tar.gz
C.tar –cvzf bugzilla.tar.gz D.tar –cxvf bugzilla.tar.gz

5. In Redhat linux 9, to install a software package, perl.i386.rpm, and display the installation progress with # during installation, the command that should be used is (A)

A.rpm –ih perl.i386.rpm B.rpm –i perl.i386.rpm
C.rpm –e perl.i386.rpm D.rpm –V perl.i386.rpm

6. In the vi editor of Linux, you want to exit vi without saving the changes. Need to use the command is (C)

A.:qa B.:qw C.:q! D.:!q

7. Two data tables are stored in a database: teacher table (teacher number, teacher name) and curriculum table (course number, course name, teacher number). To quickly find out the courses taught by a certain teacher, the following index is established The correct way is (C)

A.Create an index on the teacher table by teacher ID
B. Create an index on the curriculum by course number
C. Create an index on the curriculum by teacher number
D. Index on teacher table by teacher name

8. To query the situation of all books containing "computer" in the book name (bookname) in the book table, you can use the statement (B)

A. SELECT * FROM book WHERE bookname LIKE 'computer'
B. SELECT * FROM book WHERE book_name LIKE '%computer%'
C. SELECT * FROM book WHERE book_name='computer'

9. Which of the following statements about alpha testing is correct: (AD)

A.alpha testing requires user representatives to participate
B.alpha testing does not require user representatives to participate
C.alpha testing is a type of system testing
D.alpha testing is a type of acceptance testing

10. Who will participate in the software test plan review? (ABCD)

A. Project manager
B. SQA leader
C. Configuration leader
D. Test group

4. The most complete software testing interview questions on the whole network with answers (performance testing + functional testing + interface testing + automated testing)

performance testing

Briefly describe the performance testing process?

1. Analyze performance requirements.
2. Develop a performance test plan.
3. Write test cases
4. Build a test environment and prepare test data
5. Write performance test scripts
6. Performance test script tuning.
7. Design test scenarios.
8. Analyze test results.
9. Regression performance testing.
10. Write test report.

In what environment and when is your performance test performed?

We will build an independent performance testing environment for testing. In terms of time,
benchmark testing: after functional testing, we will do it when the system is relatively stable.
Load testing: in the dead of night, when no one is using the system

What is the role of think_time?

Simulate real production user operations to examine the impact on the server.
After confirming that the performance test results are credible, if the following problems are found, locate the problems according to the ideas provided below

With the verification code function, how to do performance testing?

1. Temporarily block the verification code, and restore it after the performance test is completed.
2. Use the universal verification code

What are the performance test indicators?

Response time
  Throughput
  cpu
  memory
  io
  disk

functional testing

What do you think about the industry of software testing, why should you choose software testing?

Software testing is a promising career. I have more experience in this industry. I think I am very suitable for this position and I want to go on firmly.

What should you do if a bug is found during testing but the developer thinks it's not a bug?

First, submit the problem to the defect management platform for filing and registration. Then, to obtain the basis and criteria for judgment:

According to the requirements specification, product description, design documents, etc., confirm whether the actual results are inconsistent with the plan, and provide direct basis for confirming the defects;

If there is no document basis, it can be confirmed whether there is a defect based on the general characteristics of similar software to explain whether there is any inconsistency;

According to the user's general usage habits, to confirm whether it is a defect;

Discuss with relevant personnel such as designers, developers, and product managers to confirm whether it is a defect.

Make a reasonable discussion, explain the reasons for your judgment to the test manager, pay attention to objectivity, rigor, and do not mix personal emotions. Wait for the product manager to make a final decision. If there is still a dispute, confirm with the test manager. When sending the online report, leave the risk of this bug as an early warning, and let everyone in the project know about this situation.

What are the methods of designing test cases?

Equivalence classes, boundary values, decision tables, cause-and-effect diagrams.

What is the strategy for software testing?

Software testing strategy: under the guidance of certain software testing standards and test specifications, the collection of principles, methods and methods of software testing stipulated according to the specific environmental constraints of the test project.

What is the task of a tester in the software development process?

(1) Find out the bugs in the system as early as possible;

(2) Avoid defects in the software development process;

(3) Measure the quality of the software and ensure the quality of the system;

(4) Pay attention to the needs of users and ensure that the system meets the needs of users. The overall goal is: to ensure the quality of the software.

Interface automation testing

The difference between get and post?

Get request, the browser will send the http header and data together, the server returns a 200 response code
Psot request, the browser sends the header first, the server responds 100 (continue), and then sends data, the server returns a 200 response code
Post is more secure than get high

How to deal with the association in interface automation?

Pass the result returned by the previous request into the parameter of the next request, reflect the result of the request to a class attribute (using the setattr() function), and call the class attribute in the next request

How to verify the results of automated testing?

Assertions, where expected results are compared to actual results

Database verification, according to the test scenario to query the data in the database and compare the data before the request

Tell me about your understanding of parameterization and data-driven?

This question involves two very important concepts in automated testing: parameterization and data-driven. Actually it seems to me that they are the same thing - the separation of test scripts and data. For example: Your login script originally wrote a fixed set of test data: username, password. Every time the data is changed, the script needs to be changed. If I want to separate the data from the script, then extract the user name and password to the outside, preferably in an external file. This is called parameterization.

For performance testing, I want to ensure that each virtual user logs in with a different username and password, which is closer to real business scenarios. For automated testing, I want to test a variety of data combinations - such as various types of usernames, passwords. Regardless of the scenario, there must be multiple sets of data, but the login operation process is fixed. This is called data-driven.

Unit test frameworks for general development languages ​​have data-driven functions, such as Python's ddt module and TestNG's DataProvider annotation.

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

Same as above, for data creation and data cleaning, you need to use python to connect to the database, and do addition, deletion, modification and query operations
Pre-operation of test cases, setUp for data preparation
Post-operation, tearDown for data cleaning

Aspects of WebUI automated testing

How to determine whether an element exists in selenium?

There is no native method to judge whether an element exists. Generally, we can judge by locating elements + exception capture

Can hidden or display = none elements be located in selenium?
No, if you want to click, you can use js to remove the property of display=none

How to increase the execution speed of selenium script?

1. Optimize test cases.
2. Reduce unnecessary operation steps.
3. Interrupt page loads.
4. Use Selenium grid.

What is Continuous Integration?

Frequently integrate the code into the trunk, and continuously carry out the construction of the project, so that errors can be found quickly and prevent the branch from greatly deviating from the trunk

What is stratified testing?

1. Data layer
2. Interface layer'
3. UI layer

App testing

Please explain the difference between IOS mobile phone and Android mobile phone, the system?

The two operating mechanisms are different: IOS uses a sandbox operating mechanism, and Android uses a virtual machine operating mechanism.

The background system of the two is different: any third-party program in IOS cannot run in the background; any program in Android can run in the background and will not be closed until there is no memory.

What do you think the performance test of the app, that is, the special test, needs to focus on?

Memory, cpu usage, power consumption, traffic, etc.

Please briefly introduce the four-layer architecture of the Android system?

From top to bottom, it is the application program layer, the application program framework layer, the system runtime layer, and the Linux core layer

What will you do if you encounter a crash or ANR in the app during the test?

You can filter the logs first: adb logcat | findstr xxxxx (filter log information), and then search for the keywords in it, such as: exception, crash, to see which methods or exceptions caused the problem to be sent, and after initially locating the cause of the problem , can be handed over to the developer to find out the underlying cause and fix it.

Please briefly introduce the practical Android UI automation testing tools?

appium: It is a mobile automation framework that can be used to test native applications, mobile web applications and hybrid applications, and is cross-platform.

robotium: It is a foreign Android automated testing framework, mainly for black-box automated testing of Android platform applications. It provides APIs for simulating various gesture operations (click, long press, slide, etc.), search and assertion mechanisms, and can Operate various controls.

Full Stack Automation Testing Interview Questions

1. Web automation testing interview questions

1. Can hidden or display = none elements in Selenium be located?

No, you can write JavaScript to change the hidden in the label to 0 first, and then position the element.

2. How to ensure the success rate of operating elements in Selenium? In other words, how to ensure that the element I click must be clickable?

Add element intelligent waiting time driver.implicitly_wait(30)
Add mandatory waiting time (such as writing sleep in python)
try to locate id, name, clas, x path, css selector in different ways, if the first one fails, you can automatically try the second one Two kinds

3. How to increase the execution speed of Selenium script?

Code optimization, multitasking, and distributed deployment can all improve script execution speed.

4. The use case is often unstable during the running process, that is to say, it can pass this time, but it will not pass next time. How to improve the stability of the use case?

time.sleep( )
driver.implicitly_wait(30)
Use try to capture and handle exceptions

5. What is the execution strategy for your automation use case?

Automated testing is essentially the same as software development. Using automated testing tools and analyzing test requirements, design automated test cases to build an automated testing framework, design and write automated scripts, verify the correctness of test scripts, and finally complete automation. Test test scripts (that is, application software whose main function is testing) and output test results.

6. Is it necessary to connect to the database for data verification during automated testing?

Data verification at the database level can more easily verify whether the data processing of the system is correct. After the data processing logic is normal, verification at the UI level is also required.

7. Among the attributes of id, name, class, xpath, css selector, which one do you prefer and why?

Almost all elements of css and xpath can be located, but their shortcoming is that the position is easy to change after the element is changed on the page, so the id or name is used first.

8. How to locate the dynamically loaded elements on the page?

Trigger the event of the dynamically loaded element until the dynamic element appears for positioning

9. How to locate elements whose attributes change dynamically?

xpath or css locates through siblings, parents, and children

10. After clicking a link, will Selenium automatically wait for the page to load?

Will do

11. What is the page object design pattern?

To put it simply, it is to use the page as an object, pass the page object in use, and use the corresponding members or methods in the page object, which can better reflect the object-oriented and encapsulation features of the object-oriented language (such as java or python).

12. How do I highlight elements after positioning them (for debugging purposes)?

Use scripts such as JavaScript to reset element attributes, and add backgrounds and borders to positioned elements.

13. What is an assertion?

An assertion is a logical expression that specifies a state that a program must already have, or a condition that a set of program variables must satisfy at some point during program execution.

14. What do you think is the biggest flaw in automated testing?

Unstable
Reliability
Difficult to maintain
Costs and Benefits

2. APPUI automation test interview questions

1. When the Android APP memory is insufficient, how does the system end the process to obtain memory?

The system gives priority to ending the suspended (suspended) process and releases memory.

2. What are the common serious problems in APP testing? What are the causes respectively?

The common ones are crash and ANR (application unresponsive, stuck), generally caused by device fragmentation, large network fluctuations, memory leaks, and code writing errors.

3. Please briefly introduce an APP automated testing tool you have used?

Open-ended questions with some subjective opinion

Compare the pros and cons of other familiar automation tools.
A brief plan for automation (please be specific about the key content while being brief). (hint: appnium etc.)

4. What is the difference between Android testing and web testing?

Same point:

The design of test cases is based on methods such as equivalence classes and boundary values, and the test principles are the same;
most of them use black-box testing methods to verify business functions;
it is necessary to check whether the interface layout, style, and buttons are beautiful and unified (UI testing)
; The speed of page loading and page turning, whether the login time overflows and other issues (performance test)
test the stability of the application system;

difference:

The mobile phone is used as a communication tool, and some behaviors such as communication will cause APP (interruption test).
Mobile phone users' installation and uninstallation of app products: directly upgrade from the previous version/two previous versions to the latest.
The most commonly used tools for web automated testing are selenium, while the more commonly used automated tools for android mobile phone automated testing are monkey, monkeyrunner, and Appium (test tools are different)

5. What kinds of environments are there for app testing?

Local environment: The mobile phone environment where the app is installed and the automated test environment built on the computer (such as Android SDK, etc.
).
Server environment: the server deployed by the war package, the server can be accessed through a browser or through an app
. (Access is the interface of the web program)

6. Briefly introduce the installation steps of the Android SDK:

Download jdk and Android SDK
to install jdk, configure environment variables (java_home, classpath, path)

7. Please briefly introduce the test points of the mobile application and its server?

Mobile applications mainly include permissions, installation, operation and uninstallation, UI, function, performance, interruption, compatibility, security,
regression, upgrade and update, and user experience. (The 11 major test points of the app)
The server has interface testing, performance testing, and security testing.

8. How to judge whether the app bug is a client problem or a background problem

This depends on the business. There are more front-end problems with general data problems. The general approach is to raise problems to front-end developers.
They know whether it is their own problem or the data returned by the background.

9. How to retrieve log information in Android?

Import the log information of the Android system to the local in real time: adb logcat -v time > d:\mylog.log
Run and use an app to obtain the log information of the app in real time (return information in cmd):
adb shell monkey -p com. android.calendar -v 1000 > d:\mylog2.log

10. Common adb commands:

View currently connected devices: adb devices
Install software: adb install path\xx.apk
Uninstall software: adb uninstall <package name>
Send files from computer to device: adb push <local path> <remote path>
adb push C:\ test1.txt /sdcard/
Download files from the device to the computer: adb pull <remote path> <local path>
adb pull /sdcard/test1.txt D:
Get logs in real time: adb logcat -v time > D:\mylog.log
Log in to the terminal device shell: adb shell
to find the package name/activity name: adb logcat | findstr START
(in the script, the value after cmp= is the package name/activity name)
Start APP Start
adb shell am start -n packageName/activity
Close app
syntax : adb shell am force-stop package name
monitor APP startup time
adb shell am start -W packageName/activity
Monkey command:
adb shell monkey -v -p mypackage 50

11. How to test so many mainstream models of APP?

Our company bought it, Meizu, Huawei, Xiaomi, iphone7, iphone8, iphone8plus, iphone
x to test compatibility, some models that are not available, first borrow a colleague’s mobile phone for testing, and apply for the company to buy at the same time, or use the
cloud real machine.

12. App crashes (flashback), what may be the reason?

Too much cache garbage: Due to the characteristics of the Android system, if you do not clean up junk files for a long time, it will lead to more and more stuck. There will also be flashbacks. Too many
programs are running, resulting in insufficient memory.
Application version compatibility problem: If the application version If it is too low, it will cause incompatibility and crash. In addition, some new versions are being debugged, which will also cause the application to crash. Solution: If the version is too old, just update to the new version; if the new version crashes, it may be that the application is being revised and debugged, and the old version can be installed after uninstalling.
Check where the APP accesses the network, and whether the ImageView in the component can be downloaded normally and displayed on the app page.
Check whether the app's sdk is compatible with the phone's system.
Flashback in some specific situations, such as playing video, when Android 5.0 is upgraded to Android 6.0,
some system APIs are available in the old version but not in the new version. Crash occurs

13. What are the startup methods of Appium

1. Client startup
2. Command line startup

14. Please briefly introduce the Android UI automation testing tools you have used?

appium: It is a mobile automation framework that can be used to test native applications, mobile web applications
and hybrid applications, and is cross-platform. robotium: It is a foreign Android automated testing framework, mainly for
black-box automated testing of Android platform applications. It provides APIs for simulating various gesture operations (click, long press,
slide, etc.), search and assertion mechanisms , able to operate various controls.

15. Please explain the difference between Android mobile phone and IOS mobile phone, and the system?

The two operating mechanisms are different: IOS uses a sandbox operating mechanism, and Android uses a virtual machine operating mechanism.

The background systems of the two are different: any third-party program in IOS cannot run in the background; any program in Android can run in the background and will not be closed until there is no memory.

IOS has the highest authority for UI instructions, and Android has the highest authority for data processing instructions.

3. Interface automation test interview questions

1. Can Webdriver be used for interface testing?

There are ready-made modules for interface testing, and WebDriver is used for automated testing of WebUI. If you want to implement interface testing, you can use the Requests module to achieve

2. According to your understanding, what is the software interface?

It refers to the class or function in the program that is specifically responsible for transmitting or receiving data between different modules and processing it.

3. What is the difference between HTTP and HTTPS protocols?

The https protocol needs to apply for a certificate from a CA (Certificate Authority, certificate authority). Generally, there are few free certificates, so a certain fee is required;
http is a hypertext transfer protocol, and information is transmitted in plain text. The network protocol for encrypted transmission and identity authentication is
safer than the http protocol;
http and https use completely different connection methods and different ports, the former is 80, and the latter is 443;

4. Which layer is HTTPS at?

HTTPS is at the application layer.

5. What is the difference between get and post?

Both POST and GET submit data to the server and both get data from the server.
the difference:

Transmission method: get is transmitted through the address bar, post is transmitted through the message Transmission
length: get parameters have a length limit (limited by the length of the url), and post is unlimited.
GET generates a TCP packet (for a GET request, the browser will Send the http header and data together, the server responds with
200 and returns the data), POST generates two TCP packets (for POST, the browser sends the header first, the server responds with 100
continue, the browser sends data again, and the server responds with 200 ok to return data)
The get request parameters will be completely preserved in the browsing history, but the parameters in the post will not be preserved.
When doing data query, it is recommended to use the GET method; and when doing data addition, modification or deletion, it is recommended to use the post method

6. Common POST data submission methods

There are four main methods: application/x-www-form-urlencoded, multipart/form-data,
application/json, text/xml, etc.

7. What is the HTTP protocol stateless protocol? How to solve the HTTP protocol stateless protocol

Stateless means that the protocol has no memory capability for transaction processing, and the server does not know what state the client is in. That is, after we
send an HTTP request to the server, the server will send us data according to the request, but no
information will be recorded after sending. HTTP is a stateless protocol, which means that each request is independent, and Keep-Alive cannot
change this result. The lack of state means that if previous information is needed for subsequent processing, it must be retransmitted, which can lead to an
increase in the amount of data transferred per connection. On the other hand, when the server does not need previous information, its response is faster. The feature of the HTTP
protocol has both advantages and disadvantages. The advantage is that the server is liberated, and each request will not cause
unnecessary connection occupation. The disadvantage is that each request will transmit a large amount of repeated content information. After the emergence of web applications that dynamically interact between the client and the server
, the stateless nature of HTTP seriously hinders the realization of these applications. After all,
the interaction needs to be a link between the past and the future. A simple shopping cart program also needs to know what the user has chosen before. commodity. Therefore,
two technologies for maintaining HTTP connection status came into being, one is Cookie, and the other is Session.

8. The difference between cookie and session

The cookie data is stored on the customer's browser, and the session data is not very safe on the server
. Others can analyze the locally stored cookie and cheat the cookie. Considering security, you should
use the session
. The session will be saved on the server for a certain period of time. . When the number of visits increases, it will occupy the performance of your server. In consideration
of reducing server performance, you should use cookies.
The data saved by a single cookie cannot exceed 4K. Many browsers limit a site to save a maximum of 20 cookies, which
can store important information such as login information. For session; other information needs to be saved, which can be placed in cookie

9. Common return status codes in the request interface

1xx – Informational (indicates a provisional response. The client is ready to receive one or more 1xx responses before receiving a regular response)
2xx – Success (indicating that the server successfully accepted the client’s request)
3xx – Redirect (client browses The server must take more action to fulfill the request. For example, the browser may have to request a different page on the server, or repeat the request through a proxy server)
4xx – Client Error (sent error, there is a problem with the client. For example, the client The client requests a page that does not exist, and the client does not provide valid ID verification information)
5xx – server error (the server cannot complete the request due to an error)
Common return codes are:

200 OK - [GET]: The server successfully returns the data requested by the user
201 CREATED - [POST/PUT/PATCH]: The user successfully created or modified data
202 Accepted - [*]: Indicates that a request has entered the background queue (asynchronous task)
204 NO CONTENT - [DELETE]: The user deleted the data successfully.
400 INVALID REQUEST - [POST/PUT/PATCH]: The request sent by the user was wrong, and the server did not perform the operation of creating or modifying the data.
401 Unauthorized -[*]: Indicates that the user has no permission (Token, username, password error)
403 Forbidden -[*]: Indicates that the user is authorized (as opposed to 401 error), but access is forbidden
404 NOT FOUND -[*]: The request issued by the user does not exist for the Record, the server did not operate, the operation is idempotent
406 Not Acceptable - [GET]: The format requested by the user is not available (for example, the user requested JSON format, but only XML format)
500 INTERNAL SERVER ERROR - [*]: The server occurred error, the user will not be able to tell whether the request made was successful

10. What is DNS?

DNS is the domain name system (Domain Name System). DNS is used for domain name resolution. It will
convert it into an IP after you enter the URL on the Internet, and then access the other server; without it, you have to remember if you want to go to Baidu Baidu's IP,
but with DNS processing, you only need to remember the domain name of the corresponding website, that is, the URL.

11. How does your company do interface testing?

The actual difference between interface testing and general testing is the design part of the test case.

Get the interface specification.
Design interface test function use cases (mainly from the perspective of users to see whether the interface can meet business requirements, use case design is the set of black box use cases).
Various input parameter verifications (normal cases, abnormal cases include incorrect number of input parameters, incorrect types, optional/mandatory, and consideration of mutually exclusive or related parameters).
Various verifications of the interface return value (conform to the requirements of the interface document)
understand the interface implementation logic, and realize logic coverage (statement/condition/branch/judgment/…)
Can the interface be executed concurrently, is it safe, and does the performance meet the requirements?
Use tools or self-writing code to verify.
The problem found is the same as the functional test, the bug should be reported, and the tracking status of the tracking status should be tracked.

12. How to design interface test cases?

Generally, the design of interface test cases needs to consider the following aspects:

Whether the preconditions are met
Some interfaces need to meet the preconditions before they can successfully obtain data. A common
reverse use case that needs to log in Token: design 0~n use cases for whether the preconditions are met (assumed to be n conditions)

Whether to carry default value parameters
Positive use case: do not fill in parameters with default values, do not pass parameters, fill in the required parameters with correct and existing "regular" values, do not
fill in others, design 1 use case

Business rules and functional requirements
Here, depending on the time situation, combined with the interface parameter description, it may be necessary to design N forward use cases and reverse use cases

Is the parameter required?
Reverse use case: For each required parameter, design a reverse use case in which the parameter value is empty

Whether there is a correlation between the parameters
Some parameters have a mutual restrictive relationship with each other

Parameter data type restrictions
Reverse use case: design a reverse use case for each parameter that does not match the parameter value type

The data range value limit of the parameter data type itself
Forward use case: For all parameters, design a forward use case in which the parameter value of each parameter is the maximum value within the data range

13. You do interface testing, what are you testing?

Usability testing
According to the agreed protocol, method, and format content, transfer data to the interface and return the expected result after processing:

Whether the interface function is correctly implemented;
return value test - the return value must be correct in addition to the content, and the type must be correct to ensure that the caller can correctly parse;
parameter value boundary value, equivalence class test;
error and exception handling test

Input abnormal values ​​(null values, special characters, exceeding the agreed length, etc.), the interface can correctly handle, and respond as expected;
input wrong parameters, the interface can correctly handle, and respond as expected;
more input, less input parameters, the interface can Correct processing and response as expected;
wrong transmission data format (such as json format written in form format) test;
security test, mainly refers to the security of transmitted data:

Whether sensitive data (such as passwords, secret keys) are encrypted for transmission;
whether the returned data contains sensitive data, such as user passwords, complete user bank account information, etc.;
whether the interface performs security verification on incoming data, such as identity ID plus token Similar verification;
whether the interface prevents malicious requests (such as a large number of forged request interfaces causing the server to crash);
performance testing, such as interface response time, concurrent processing capabilities, and stress test processing:

Concurrent requests to the same interface (especially POST requests), the processing of the interface (such as inserting the same record leads to data errors, causing system failures); the
response time of the interface is within the range that the user can tolerate
; Pressure testing to determine whether the biggest bottleneck meets current business needs;

14. What tool is usually used to test the interface?

Commonly used http protocol interface testing tools, such as: postman, fiddler, jmeter; webService interface uses SoapUI,
jmeter, etc.

15. There is no interface document, how to do interface test?

This question mainly tests EQ. In layman's terms, it is the ability to fool the interviewer. First, let the interviewer be fooled. It is also a blind test when you go in. Be prepared to take the blame at any time. Of course, you must not answer the interviewer's surprise (psychological mmp,
face Smiling), the next step is
to use the packet capture tool to capture and process the interface, and then conduct targeted testing; if the field information in the interface is unclear, find time to focus on
development solutions. (Common packet capture tools Fiddler, Charles, etc.)

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

Use a global variable to process dependent data, such as returning a token after login, and other interfaces need this token,
then use a global variable to pass the token parameter.

17. How to test the interface that depends on third-party data?

After the mock, the interviewer will ask you, if it is a mock, then you will continue to dig along the pit and build a mock service.

18. In the interface test, how to test the interface that depends on the login status?

The essence of the interface that depends on the login status is that each time a request is sent, a session or cookie needs to be included to
send it successfully, and the necessary session or cookie is added when constructing a POST request

19. How to simulate a weak network for testing?

Both Fiddler and charles can simulate weak network tests. What is usually called simulated packet loss is also a simulated weak network test. For
details, please see "Several weak network simulation methods, there is always one suitable for you"

20. What bugs have you found during your usual interface testing?

The interviewer asks this question mainly because he wants to know whether you have really done the interface test. After all, many small partners’ resumes are packaged (they don’t even have an interview opportunity without packaging, there is no way, in order to survive, I can understand) General errors,
interface It is not implemented, the result is not returned according to the agreement, the boundary value processing error, etc.
Input abnormal values ​​(null values, special characters, exceeding the agreed length, etc.), the interface throws an error, and no encapsulation is performed;
input wrong parameters, more input, less input parameters, and possible errors in the interface;
security issues, such as plaintext transmission , The returned result contains sensitive information, no verification of user identity information, no malicious request interception, etc.;
performance problems, such as concurrent insertion of multiple identical operations on the interface, long response time, bottlenecks in interface pressure testing, etc.;

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

First capture the packet, use the fiddler (charles) tool to capture the packet, or the F12 debugging tool on the browser; if it is on the APP, then use Fiddler
as the proxy, and set the proxy through the mobile phone to view the request and return message;
check the back-end log, such as The Linux system connects to the server through xhell, checks the interface log, and checks whether there is any error message (command: tail -f log file);

22. How to analyze whether a bug is front-end or back-end?

Usually when bugs are mentioned, the front-end development and the back-end development are always arguing, not admitting that it is the bug of the other party. This situation is easy to judge. First capture the packet and look at the request message, and then look at the interface document to see if there is any problem with the request message.
If there is a problem, the
data sent by the front end is wrong;
, the returned data is incorrect, that is the problem of back-end development.

23. Do you do interface test automation?

Now for a large number of applications, it is generally recommended to automate interface testing, with low maintenance costs and high returns. There are many commonly used tools
, such as Jmeter, Robot Framework, pytest, etc.

24. How many JMeter listeners are listed?

Some of the JMeter listeners are:
Collection Report
Summary Report
View Result Tree
View Results in Table Graph
Results
BeanShell Listener
Summary Report etc.

25. Data-driven testing in python

In unittest, there is no built-in data driver, we have to use ddt to achieve it, first of all, we have to
install ddt in the python operating environment, use the following command to install
pip install ddt
another test framework pytest, which comes with data-driven implementation, It is
parameterized by @pytest.mark.parametrize(argnames,argvalues).
You can also use python to read and drive data according to your own needs.

26. How to deal with the association in interface automation?

Pass the result returned by the previous request into the parameter of the next request, reflect the result of the request to a class attribute (using the
setattr() function), and call the class attribute in the next request

27. How to verify the results of automated testing?

Assertion, compare the expected result with the actual result
Database verification, query the data in the database according to the test scenario and compare it with the data before the request.

28. Specifically, how is automation applied to the actual situation in this project, and your analysis of the automation results

After completing the design and implementation of all automated testing frameworks, conduct interface testing, then integrate into
Jenkins, configure timing execution, generate html reports, check the test pass rate, and check the functions of the interface.
Every time a version is released, perform regression testing and new functions Before development and testing.

technical assistance

Finally, here is a collection of self-study tutorials for software testing. It should be very helpful to friends who are developing in the testing industry. For friends in need, you can [click the small card at the end of the article to get it for free] . In addition to basic entry-level resources, bloggers also collect a lot of advanced automation resources. From theory to actual combat, the unity of knowledge and action can truly master it. The full set of content has been packaged to the network disk, and the total content is close to 300 G.

☑ 215 episodes - a full set of video courses from zero foundation to proficiency
☑ [Courseware + source code] - complete supporting tutorials
☑ 18 sets - test actual project source code
☑ 37 sets - test tool package
☑ 268 questions - real interview questions
☑ 200 templates - Interview resume template, test plan template, software test report template, test analysis template, test plan template, performance test report, performance test report, performance test script use case template (complete information)

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, and I hope it can help you too! Everything should be done as early as possible, especially in the technical industry, we must improve our technical skills.

 


 

Guess you like

Origin blog.csdn.net/HUA1211/article/details/132275510