[Software Testing Interview Collection] Basic knowledge of software testing (1)

Please introduce unit testing, integration testing, system testing, acceptance testing, regression testing

Reference answer:

1. Unit testing: complete the verification work of the smallest software design unit (module), the goal is to ensure that the module is correctly coded, use the process design description as a guide, and test the important control paths to find errors in the module, usually The following is a white box, which conducts static tests on code style and rules, program design and structure, business logic, etc., and detects and resolves errors that are not easy to show early.

2. Integration testing: through testing, problems related to the module interface are found. The goal is to take the modules that have passed the unit test and construct a program structure described in the design. One-time integration should be avoided (unless the software scale is small), and incremental integration should be used.

Top-down integration: The order of module integration is to integrate the main module first, and then integrate downwards according to the control hierarchy. The modules belonging to the main module are integrated into the entire structure in a depth-first or breadth-first manner.

Bottom-up integration: Construct and test from the atomic module, because the module is integrated from the bottom up, it is required that all modules belonging to a given top level always exist, and there is no need to use stable test stubs necessary.

3. System test: It is a black-box test based on the overall system requirements specification and should cover all joint components of the system. System testing is a test for the entire product system. The purpose is to verify whether the system meets the definition of the requirement specification, and to find out the places that do not meet or contradict the requirement specification. The object of system testing includes not only the software of the product system to be tested, but also the hardware, peripherals and even some data, some supporting software and its interfaces that the software depends on. Therefore, the software in the system must be combined with various dependent resources and tested in the actual operating environment of the system.

4. Regression testing: Regression testing refers to retesting the previous test cases after modification to ensure the correctness of the modification. In theory, whenever a new version of the software is produced, regression testing is required to verify whether the previously discovered and fixed bugs reappear in the new software version. Re-test based on the repaired defects. The purpose of regression testing is to verify that bugs that have been fixed before do not reappear. It generally refers to retesting a known corrected defect around the steps when it originally appeared.

5. Acceptance testing: Acceptance testing refers to a stage in the system development life cycle methodology, when relevant users or independent testers test and accept the system according to the test plan and results. It lets the system user decide whether to accept the system. It is a test to determine whether the product can meet the requirements specified by the contract or the user. Acceptance testing includes Alpha testing and Beta testing.

Alpha testing: Conducted by users at the developer's premises in a controlled environment.

Beta testing: Conducted by the end user of the software at one or more user sites, the developer is usually not on site, the user records the problems encountered in the test and reports to the developer, the developer makes the final modification to the system, and starts Prepare to release the final software.

Please answer which step is the most important among the steps of unit testing, integration testing, system testing, acceptance testing, and regression testing

Reference answer:

These test steps test the software at different stages of software development. I think the system test for testing the complete functions of the software is very important, because at this time the unit test and integration test have been completed, and all functions of the software can be functionally tested. Covering all joint components of the system is a test for the entire product system, which can verify whether the system meets the definition of the requirement specification, so I think system testing is very important.

Please answer the difference between integration testing and system testing, and what are their main application scenarios?

Reference answer:

the difference:

1. The sequence of plan and use case preparation: From the perspective of the V model, system test plans and use cases must be formulated at the requirements stage, and integration test plans and use cases should be made during HLD. Some companies have different specific practices, but the order must be Do system test plan use cases first, and then do integration.

2. The granularity of use cases: system test cases are relatively close to user acceptance test cases, integration test cases are more detailed than system test cases, and the interface part should be written emphatically, after all, each module or subsystem must be integrated.

3. The order of executing the test: execute the integration test first, and then do the system test after the problems found in the integration test are fixed.

Application scenario:

Integration testing: After unit testing is completed, each module is jointly debugged and tested; focusing on whether the interfaces of each module are consistent, whether the data flow and control flow between modules implement their functions according to the design, and verify the correctness of the results, etc.; it can be The integration test of the entire product can also be the integration test of large modules; the integration test mainly tests the internal structure of the program, especially the interface between programs. Integration tests have relatively high requirements for testers' ability to write scripts. The testing methods generally use a combination of black-box testing and white-box testing.

System testing: comprehensive testing for the entire product, including verification testing of each module (verifying the correctness of the first two stages of testing) and functional testing (the function of the product submitted to the user) and the robustness of the entire product , security, maintainability and testing of various performance parameters. System testing Test whether the functions mentioned in the software "Requirements Specification" are missing and whether they are implemented correctly. To do system testing, we must strictly follow the "Requirements Specification" and use it as the standard. The testing methods generally use the black box testing method.

What knowledge is required for test development? What capabilities do you need?

Reference answer:

Required knowledge:

  • Basic theoretical knowledge of software testing, such as black box testing, white box testing, etc.;

  • Test the basics of programming languages, such as C/C++, java, python, etc.;

  • Automated testing tools, such as Selenium, Appium, Robotium, etc.;

  • Basic computer knowledge, such as database, Linux, computer network, etc.;

  • Testing frameworks such as JUnit etc.

Required abilities:

  • Business analysis capabilities, analyze the overall business process, analyze the business data under test, analyze the system architecture under test, analyze the business modules under test, analyze the resources required for the test, and analyze the completion goals of the test;

  • Defect insight ability, general defect discovery ability, hidden problem discovery ability, ability to discover joint problems, ability to discover hidden problems, ability to discover problems as early as possible, and ability to discover the root causes of problems;

  • Teamwork ability, reasonable division of labor, assisting team members to solve problems, cooperating to complete testing tasks, cooperating with development to reproduce defects, supervising the overall progress of the project, and taking responsibility for problems;

  • Professional and technical ability, master the basic knowledge of testing, master computer knowledge, and skillfully use testing tools;

  • Logical thinking ability, judging the correctness of logic, logical analysis of feasibility, and thinking from an objective perspective;

  • Problem-solving skills, technical problems, work problems, communication problems;

  • Communication and expression skills, communication with technical personnel, product personnel, and superiors and subordinates;

  • Macro control ability, effective control of test time, effective control of test cost, effective formulation of test plan, effective risk assessment, and effective control of test direction.

Please talk about the black box and white box testing methods

Reference answer:

Black box testing:

Black-box testing is also called functional testing or data-driven testing. It is based on the functions that the product should have. Through testing, it is tested whether each function can be used normally. When testing, the program is regarded as a black box that cannot be opened. Basin, without considering the internal structure and internal characteristics of the program, the tester conducts tests on the program interface. It only checks whether the program functions are in normal use according to the requirements specification, and whether the program can properly receive input data and generate Output information correctly and maintain the integrity of external information such as databases or files.

The "black box" method focuses on the external structure of the program, does not consider the internal logical structure, and tests the software interface and software functions. The "black box" method is an exhaustive input test. Only when all possible inputs are used as test cases can all errors in the program be found in this way. In fact, there are infinitely many test cases, so not only all legal inputs must be tested, but also those illegal but possible inputs must be tested.

Commonly used black-box testing methods are: equivalence class division method; boundary value analysis method; causal diagram method; scenario method;

White box testing:

White-box testing, also known as structural testing or logic-driven testing, is a test for how the unit under test works internally. It designs test cases according to the control structure of the program and is mainly used for software or program verification. The white-box testing method checks the internal logic structure of the program and tests all the logic paths. It is an exhaustive path testing method, but even if every path has been tested, errors may still exist. Because: the exhaustive path test cannot check whether the program itself violates the design specification, that is, whether the program is a wrong program; the exhaustive path test cannot detect that the program has errors due to missing paths; related errors.

The principles to be followed in white box testing are: 1. Ensure that all independent paths in a module are tested at least once; 2. All logical values ​​need to be tested for true (true) and false (false); two cases; 3. Check the program 4. Run all loops within the upper and lower boundaries and operable range.

Commonly used white box testing methods:

Static testing: testing without running the program, including code checking, static structural analysis, code quality measurement, document testing, etc. It can be done manually to give full play to the advantages of human logical thinking, or it can be done automatically with the help of software tools (Fxcop) .

Dynamic testing: It is necessary to execute the code and find the problem by running the program, including function confirmation and interface testing, coverage analysis, performance analysis, memory analysis, etc.

Logic coverage in white box testing includes statement coverage, decision coverage, condition coverage, decision/condition coverage, condition combination coverage and path coverage. The ability of the six coverage criteria to detect errors shows a change from weak to strong:

1. Statement coverage Every statement is executed at least once.

2. Each branch of a decision covering each decision is executed at least once.

3. Condition coverage Each condition of each decision should take various possible values.

4. Judgment/Condition Coverage Satisfy the decision coverage condition coverage at the same time.

5. The combination of conditions covers each combination of conditions in each decision at least once.

6. Path coverage causes every possible path in the program to be executed at least once.

Please tell me the advantages and disadvantages of manual testing and automated testing

Reference answer:

Disadvantages of manual testing:
1. Repeated manual regression testing is expensive and error-prone.

2. Rely on the ability of software testers.

Advantages of manual testing:

1. Testers have experience and the ability to guess errors.

2. Testers have aesthetic ability and psychological experience.

3. Testers have the ability to judge right and wrong and logical reasoning.

Advantages of automated testing:

1. The regression test of the program is more convenient. This may be the most important task of automated testing, especially when the program is modified frequently, the effect is very obvious. Since the actions and use cases of the regression test are completely designed, the expected results of the test are also completely predictable. Running the regression test automatically can greatly improve the test efficiency and shorten the regression test time.

2. More and more tedious tests can be run. An obvious benefit of automation is the ability to run more tests in less time.

3. Some tests that are difficult or impossible to perform by manual testing can be performed. For example, for the testing of a large number of users, it is impossible to allow enough testers to test at the same time, but it is possible to simulate many users at the same time through automated testing, so as to achieve the purpose of testing.

4. Make better use of resources. Automating tedious tasks can improve accuracy and tester motivation, freeing test technicians to devote more energy to designing better test cases. Some tests are not suitable for automatic testing, but only for manual testing. After automating the tests that can be automatically tested, testers can focus on the manual testing part and improve the efficiency of manual testing.

5. The test is consistent and repeatable. Since the test is executed automatically, the consistency of the result of each test and the content of the execution can be guaranteed, so as to achieve the repeatable effect of the test.

6. Test reusability. Since automatic testing usually uses scripting technology, it is possible to use the same use case in different testing processes with little or no modification.

7. Increase software trust. Since the tests are executed automatically, there are no oversights and mistakes in the execution process, it all depends on the design quality of the tests. Once software has passed robust automated testing, trust in the software will naturally increase.

Disadvantages of automated testing:

1. Cannot replace manual testing

2. Manual testing finds more defects than automated testing

3. Great dependence on test quality

4. Test automation does not improve effectiveness

5. Test automation may restrict software development. Since automated tests are more brittle than manual tests, maintenance will be limited, thereby constraining software development.

6. The tool itself has no imagination

How do you see the potential and challenges of software testing?

Reference answer:

Software testing is a rapidly evolving and challenging field. Although the emergence of many automated testing software now replaces the traditional manual testing methods, a large number of professional skills are still required in the development of automated testing tools, security testing, test modeling, precision testing, performance testing, reliability testing and other special tests. With the development of cloud computing, Internet of Things, and big data, traditional testing techniques may no longer be applicable, and testers are therefore faced with challenges. They need to have a deep understanding of new scenarios and try new ones for different scenarios. The emergence of testing methods, agile testing and Devops also shows the potential of software testing.

What do you think is the core competitiveness of software testing

Reference answer:

The core competitiveness of testers lies in finding problems early and being able to find problems that others cannot find.
1. Early detection of problems: The earlier a problem is discovered, the lower the cost of solving it. If a requirement can find a loophole in the requirement before it is realized, then the value of this kind of problem is the highest.

2. Find problems that others cannot find: If you find problems that everyone can find, it proves that you can be replaced. If others cannot discover it, but you can discover it, then you cannot be replaced.

How do you think testing and development need to be combined to better guarantee the quality of software?

Reference answer:

Testing and development should be combined according to the W model, and testing and development should be carried out simultaneously, so that software defects can be discovered as early as possible and the cost of software development can be reduced.

insert image description here
In the V model, the testing process is added in the second half of the development process, and whether the development of the code detected by the unit test meets the requirements of the detailed design. Integration testing checks whether the previously tested components fit together well. The system test detects whether the integrated products meet the requirements of the system specification. Acceptance testing, on the other hand, checks whether the product meets the needs of the end user. The defect of the V model is that it only regards the testing process as a stage after requirements analysis, system design and coding, and ignores the verification of requirements analysis and system design by testing. It is found that making up at this time will consume a lot of human and material resources.

Compared with the V model, the W model increases the verification and confirmation activities that should be carried out simultaneously in each software development stage. The W model consists of two V-shaped models, representing the testing and development process respectively. The figure clearly shows the parallel relationship between testing and development.

The W model emphasizes that testing is accompanied by the entire software development cycle, and the object of testing is not only the program, but also the requirements, design, etc., that is to say, testing and development are carried out simultaneously. The W model is conducive to the early and comprehensive discovery of problems. For example, after the requirements analysis is completed, testers should participate in the verification and confirmation of the requirements to find out the defects as early as possible. At the same time, the testing of requirements is also conducive to timely understanding of project difficulty and testing risks, and early formulation of countermeasures, which will significantly reduce the overall testing time and speed up the project progress.

insert image description here
The testing activities in the W model are carried out simultaneously with the software development. The object of the test is not only the program, but also the requirements and design. Therefore, software defects can be found early and the cost of software development can be reduced.

Do you think unit testing is possible?

Reference answer:

Feasible, unit testing can effectively test the behavior of a program module, which is a confidence guarantee for future code refactoring. The quality can be guaranteed in advance, and the problem can be quickly reproduced afterwards, and regression self-test can be done after modifying the code. The feasibility consideration is to use some feasible methods to make the key code testable, such as through boundary conditions, equivalence class division, error, causality, and design test cases to cover commonly used input combinations, boundary conditions and exceptions.

What do you think is the meaning of automated testing and what needs to be done

Reference answer:

The significance of automated testing lies in
1. It can automatically perform regression testing on the new version of the program

2. It is possible to perform tests that are difficult or impossible to perform manual testing, such as stress testing, concurrency testing,

3. Better use of resources, saving time and manpower

Before executing automated testing, first judge whether the project is suitable for promoting automated testing, then analyze the requirements of the project, specify a test plan, build an automated testing framework, design test cases, execute tests, and evaluate

Could you please answer what is the relevant process of the test?

Reference answer:

The most standardized process of testing is as follows
Requirements testing -> outline design testing -> detailed design testing -> unit testing -> integration testing -> system testing -> acceptance testing

from W model

Please tell me how to write test cases

Reference answer:

1. Testers intervene as early as possible to thoroughly understand the requirements. This is the basis for writing good test cases

2. If you have similar requirements before, you can refer to the test cases for similar requirements, and then you need to look at the bugs of similar requirements

3. Be clear about the various possibilities of input and output, as well as the relationship between various inputs, understand the execution logic of requirements, and find out most of the use cases through methods such as equivalence classes, boundary values, and decision tables

4. Find some features related to the requirements and supplement the test cases

5. Analyze the missing test scenarios based on your own experience

6. Only by summarizing more test points with similar function points can we write test cases with higher and higher quality

7. The writing format must be clear

  • What do you think the specific work of the test project is?

Reference answer:

Set up a test environment

Write test cases

Execute the test case

Write test plan, test report

Test and submit bug form

Track bug modification

Execute automated testing, scripting, execution, analysis, reporting

Conduct performance testing, stress testing and other testing, execution, analysis, tuning, reporting

  • If you want to evaluate bugs, how to evaluate bugs?

Reference answer:

Priority () and severity () of a bug are two important attributes. Usually, when a person submits a bug, he or she only defines the severity, and assigns the priority to the leader to define. Usually, in bug management, the severity is divided into four levels: blocker, critical, major, minor/trivial, and priority is divided into five levels immediate, urgent, high, normal, low.
Severity:

1. Blocker: The system cannot be executed, crashes, or is seriously insufficient in resources, and the application module cannot be started or exits abnormally, and cannot be tested, resulting in system instability. The common ones are severe blurred screen, memory leak, loss or destruction of user data, system crash/crash/freeze, module failure to start or exit abnormally, serious numerical calculation errors, functional design seriously inconsistent with requirements, and other errors that make it impossible to test, such as Server 500 error.

2. Critical: It refers to the function or operation of the imaging system. There are serious defects in the main function, but it will not reflect the stability of the system. The common ones are: unrealized functions, function errors, system refresh errors, data communication errors, slight numerical calculation errors, wrong words or spelling errors that affect functions and interfaces.

3. Major: the interface, performance defects, and compatibility. The common ones are: wrong operation interface, wrong boundary conditions, wrong prompt information, no progress prompt for long-term operation, unoptimized system, and compatibility issues.

4. minor/trivial: Ease of use and suggestive issues.

Priority

1. Immediate: solve it immediately,

2. Urgent: Urgent need to solve

3. high: attaches great importance to it, and needs to be resolved immediately when there is time

4. low: solve it before the system is released, or confirm that it is not necessary to solve it.

Finally : In order to give back to the die-hard fans, I have compiled a complete software testing video learning tutorial for you. If you need it, you can get it for free【保证100%免费】

Software Testing Interview Documentation

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Ali, Tencent, and Byte, and some Byte bosses have given authoritative answers. Finish this set The interview materials believe that everyone can find a satisfactory job.

全部资料获取:

insert image description here

Guess you like

Origin blog.csdn.net/m0_53918927/article/details/131789459