Software test base
First, software test overview
Software testing is an important part of the software development process, which is used to confirm that the quality or performance of a program is in line with some requirements raised before the development. The purpose of the software test, the first is to confirm the quality of the software, which is the one aspect is to confirm that the software does what you expect (do the right thing), on the other hand, confirming the software in the right way, this event (Do IT Right). The second is to provide information, such as providing feedback information to the developer or program manager, for the information prepared by the risk assessment. The third software test is not only in the test software product itself, but also the process of software development. If a software product is developed, many problems have been found, this shows that this software development process is likely to be defective. Therefore, the third purpose of software testing is to ensure that the entire software development process is high quality.
Software quality is measured by several aspects: First, use the correct way to correct a work correctly (Doing the Right Things Right At the Right Time.). Second, in line with some applications, such as different operating habits and requirements in different countries, the maintenanceability, testability of project engineering. Third, the quality itself is the software to achieve the required requirements, and the beautiful or delicate skills of the code do not represent the high quality of the software (Quality Is Defined As Conformance To Requirements, Not AS "Goodness" or "Elegance". ). Fourth, the quality also represents it in line with customer needs (Quality Also Means "Meet Customer Needs".). As a software testing this industry, the most important thing is from the customer's needs, from the customer's perspective, how can customers use this product, what kind of problem will be encountered during use. Only these problems have been solved, the quality of software products can be said to be up.
Test staff in the software development process:
1, look for bugs;
2. Avoid defects during software development;
3. Measure the quality of the software;
4. Focus on the needs of users.
The total goal is to ensure the quality of the software.
Second, the common software test method
Black box test
The black box test As the name is to see the test system as a black box, get the input from the outside, and then output. The entire test is based on the demand documentation to see if all requirements in the demand document. The black box test requires that the tester cannot use knowledge or experience related to the internal structure of the system under test, which is suitable for testing the functionality of the system.
The advantages of the black box test are: 1) relatively simple, do not need to understand the code inside the program and implementation;
2) Unrelated to the internal implementation of the software;
3) From the perspective of the user, it is easy to know which functions will be used in the user;
4) Based on the software development document, you can also know which functions in the document are implemented;
5) It is more convenient to do software automation testing.
The disadvantage of the black box test is: 1) It is impossible to cover all the code, the coverage is low, and only 30% of the total code amount can only be reached;
2) The reuse of the automation test is low.
2. White box test
White box testing refers to the structure of the subject to be measured during testing, which can be found in the test work of the test code. It needs to know the design structure and specific code implementation inside the program, and to design test cases based on this. As the following program code:
HRESULT Play (char * pszfilename)
{
IF (null == pszfilename)
Return; if (state_pened == currentstate)
{
Playthefile ();
}
Return;
}
After reading the code, you can know, first check if a string is empty, then perform the corresponding action according to the current state of the player. You can design some test cases: For example, the string (file) is empty, what is the situation; if the status of the player is that the file is just open, what is the situation; if the file is already playing, then call this function will be what's the situation. That is to say, there are many different test cases, depending on the internal state of the player. These are not necessarily what they can do when they are purely black boxes.
The direct advantage of the white box test is to know which places designed in the code level are ignored. Its advantage is to help the software testers increase the coverage of the code, improve the quality of the code, and find hidden problems in the code.
The shortcomings of white box tests are:
1) There will be many different paths, and all run paths cannot be tested;
2) Test Based on code, you can only test the pair of developers, and you can't know the correctness of the design, you may miss some functional needs;
3) When the system is huge, the test overhead will be very large.
3. Risk-based test
Risk-based testing refers to the priority of evaluation tests, first do high priority tests, if time or energy is not enough, low priority tests can be temporarily doing. There is a picture, the horizontal axis represents the impact, the vertical axis represents the probability, according to the characteristics of a software: If a function has a problem, it has a big impact on the entire product, how much is the probability of this feature? If the problem is very large, there is a big impact on the entire product, so you must override it when testing. For a very few functions of a user, the probability of problem is small, and it is not very impact on the problem. If the time is tight, it can be considered.
Two decisions based on risk testing are: how big is the problem in the problem, how big is the probability of problem. Other influencing factors have complexity, availability, dependence, modifiable. The tester mainly determines the focus of testing based on the light weight of things.
4. Model-based test
The model is actually described in terms of language to describe a system behavior, define it possible various states, and the conversion relationship between them, that is, the status conversion diagram. The model is the abstraction of the system. Model-based testing uses models to generate corresponding test cases, and then test the system according to the difference between actual results and the original expected results, the process is shown below.
Third, the type of software test
Common software test types are:
BVT (Build Verification Test)
BVT is in all the development engineers have been checked in their own code. After the project team builds the version of the day, the main purpose is to verify that the latest software version is complete, the main software characteristics are correct. If there is no big problem, you can perform a corresponding functional test. The BVT advantage is that the time is short, verify the basic functions of the software. A disadvantage is that the coverage of this test is very low. Because there is a short run, it is impossible to test all the circumstances.
Scenario Tests (test based on user practical application scenarios)
When doing BVT, functional test, it is possible to test a module or more separated function. When the user uses this application, each module is used as a whole, then when doing testing, it is necessary to imitate the user such a real use environment, which is what the user will use, which will use this application. What is the process of doing it? After adding these test cases, then with BVT, function test, the software can make the entire software to meet the requirements of users. The Scenario Tests advantage is to pay attention to the user's demand, and the disadvantage is sometimes difficult to truly imitate the user's true usage. Smoke test
I found a problem in the test, found a bug, and then the developer will fix this bug. At this time, I want to know if this fix has really solved the program's bug, or if it will affect other modules, it is necessary to conduct special tests for this issue. This process is called Smoke Test. In many cases, smoke test is a series of chain reactions that developers who have tried to solve a problem. The reason may be, which is only concentrated on the problem, and ignore other problems. It may cause new bugs. The SMOKE TEST has the advantage of saving test time and preventing Build fail. The disadvantage is that the coverage is still relatively low.
In addition, Application Compatibility Test, the main purpose is to compatibility with third-party software, ensuring that third-party software can run normally, and users are not affected. Accessibility Test (Software Applicability Test) is to ensure that software can be used normally for some people with disabilities, but the priority is relatively low. Other tests include Functional Test, Security Test, Stress Test, Performance Test, Regression Test, Setup / Upgrade Test (Installation Upgrade Test) Wait.
Fourth, Microsoft's software test work
Basic situation
Testing in Microsoft is a very important job, Microsoft's investment in this area is very huge. Microsoft's emphasis on testing in the project development team, Microsoft's project manager, software developer and testers are basically 1: 3: 3 or 1: 4: 4, can see developers and testers The ratio is 1: 1. The attention of the test is also manifested when the final product is to be released, all relevant departments of this product must sign, and testers have absolute veto.
Divided into two positions, Software Development Engineer in Test actually belongs to developers, and they have the ability to write code and the experience of development tool software, focusing on the development of automation test tools and test scripts. , Implement the test automation. Software Test Engineer is specifically responsible for testing software products, mainly completing some manual testing and installation.
2. Test plan
The test plan is a testee management test project that looks for a valid tool for bugs in the software. There are two main functions of the test plan. First, the evaluation team's test coverage and efficiency make the test work are gradually gradually expanded. The second is to facilitate communication with the project manager and developers. With the test plan, they can know how you will conduct test work, and they will also propose a lot of beneficial advice to ensure the smooth progress of the test work. In short, there is a test plan to better complete the test work to ensure user satisfaction. The tester should get the following documentation before writing a test plan:
1) Product function manual or product development plan prepared by the program manager;
2) The development schedule provided by the program manager or developer.
According to the characteristics and development schedules and development schedules, testers formulate specific test programs. Test plans typically include the following:
1) Test objectives and posting conditions:
a. Describe a clear test objective;
b. Define the publishing condition of the product, that is, to release a particular version of the product will be issued under the premise of the test objective.
2) Waiting for the product range:
a. Software main feature / function description, the main characteristics of the software to be tested;
b. Feature / Function Test List, cover all features, dialogs, menus, and error messages, and suits key features that must be considered in each test range.
3) Test method description:
a. Test method used when defining test software products;
b. Describe each particular test method which test range can be covered.
4) Test schedule:
a. Define the test milestone;
b. Define the detailed test progress of the current milestone.
5) Test resources and related program managers / development engineers:
a. Define the personnel involved in the test;
b. Describe the scope of responsibility of each tester;
c. Give relevant information related to the program manager / development engineer.
6) Configuration range and test tools:
a. Give a list of all computer platforms used during testing;
b. Description Test which hardware devices are covered;
c. The main test tool used during testing.
In addition, it is also possible to list the risk and test dependence of the test in the test, that is, whether the test relies on a product or a team. For example, the test dependent Windowsce this operating system, and this system will be available in February next year, then this test may only be completed in May, so there is dependency. If the development plan is pushed, this test will be postponed.
3. Test case development
A good test case is a reasonable probability to find bug, don't reduce, it is targeted, a test is only for one thing. In particular, when a test is a function, if the test result fails, I don't know which feature is a problem.
The technique of test case development is mainly used in equivalent type, the boundary value analysis, Error Guessing Testing.
Equivalent class division is based on the input and output conditions, and some of their own characteristics into two or more subsets, and reduce the number of cases required for testing, and can cover many cases with few tests, reduce testing Use of redundant degree. In equivalent classification, the most basic division is a class that is a legitimate class.
The analysis of the boundary value is to take advantage of a law, that is, the program is most likely to occur in the vicinity of the boundary value, depending on the type of variable, and the range of value of the variable. Generally, for N variables, there will be 6N 1 test case, and the values are MIN-1, MIN, MIN 1, NORMAL, MAX-1, MAX, MAX 1 combination. The disadvantage of the analysis of the boundary value is that logical variables and Boolean variables do not work, and may ignore some combinations of certain inputs. Error Guessing Testing is completely experienced, and the test case designed is to speculate. Feeling that software may be wrong in some places, to design the corresponding test case, mainly due to experience and knowledge accumulated in actual work. Its advantages are fast, as long as you want to get, you can quickly design test cases. The disadvantage is that there is no systematic, it is impossible to know how much coverage will be, it is likely to miss some test fields.
In fact, Microsoft is a specific software or tool to be managed by some special software or tools. Some test information can be recorded, such as the brief description of the test case, which platform is executed, is a manual test or an automatic test, running frequency is Run once a day, or run once a week. There are also clear tests that pass or fail, and each step of the test.
4. BUG tracking process
In a software development project, a tester's most important mission is to effectively track and manage all known BUGs, ensuring that all issues in the product can be effectively resolved. Generally, the project team found, positioned, handled, and finally solved a bug process included BUG report, bug evaluation and allocation, BUG processing, bug closing and other four phases:
1) After the test engineer discovered new bugs during the test, the BUG should be reported to the project group, performance, current state, etc. information. The project group adds the bug record to the bug database.
2) The development manager focuses on the discovered bug, based on the impact of bugs to the software product, and develops a BUG correction policy. According to BUG's priority order and developers' work arrangements, the development manager allocates all BUG that needs to be processed to the corresponding development engineer.
3) Development engineers are processed according to the arrangement of specific bugs, find out the wrong reason, modify the code, and regenerate the product version.
4) After the development engineer handles the bug, the tester needs to verify the processed result, and the confirmed BUG is labeled as a shut-off state. The test engineer needs to verify that the bug has been corrected, but also need to determine whether the developer introduces new bugs while modifying the code.
5. Different processing methods of BUG
In some cases, BUG has been processed does not mean that bug has been corrected. Development engineers can postpone the revision time of the bug, or inform the test engineer after analysis, this is actually not a real bug. That is, after a specific BUG is handled by the engineer, the bug may include the following states.
Amended: Development engineers have amended the corresponding program code, the bug will not appear.
Delayed: The BUG is less important and does not affect the main function of the current submit version, can be arranged in the next version.
Design Problem: This bug has nothing to do with the program, and the behavior it shows is fully compliant, and it should be submitted to the program manager processing.
There is no need to fix: the BUG is very important. It does not affect the functionality of the program. The project group does not have to waste time over these bugs.
5. Be a requirement for excellent test engineers
To become an excellent test engineer, you must first have a good understanding of the basic knowledge of your computer, mastering one or more programming languages, with certain procedure commissioning skills, master the development and use of test tools. At the same time, it is more careful and will arrange your own work in accordance with the task, and there is a good communication ability. In addition, it is necessary to think about problems in unconventional ways, and participate in software test projects as much as possible, learn skills, accumulate experience, continuous analysis and summary of software development process in practice. In this way, an excellent test engineer stands out from the practice of software testing. Conclusion: Microsoft's software development experience has accumulated deep, Microsoft engineers' teaching vivid seminars, some of which are detailed explanations made by the programming code, more difficult to use introduction text, and universally, and the author is limited, Can only take part of the essence content to organize the text to readers, so it is inevitable that there will be a mistake, and even if there is a mistake, please understand and correct for the attention of this series of articles. Finally, the hard work of Microsoft's teachers is proud of their words!
(Disclaimer: This series of teaching notes are complicated with relevant information, only for personal learning, research or appreciation, please indicate the origin. For commercial purposes, you must have a license for posts.)