Software Test definition
Software testing is the use of software or manual method to verify whether the target software meets the required requirements or to clarify the difference between the expected results and actual results of the operation, which is designed to evaluate the software properties or capabilities, to investigate whether the target software to meet the requirements.
Testing principles
First, the test should be carried out as early as possible, preferably at the demand stage, because the most serious error is that the system can not meet the needs of users.
Second, programmers should avoid checking their own programs, software testing should be the responsibility of third parties.
Third, the design of test cases should take into account the legal input and illegal input and a variety of boundary conditions, in particular, to create extreme state and unexpected state, such as network abnormal interruption, power outage and so on.
Four, we should pay full attention to the cluster phenomenon in the test.
Five, a confirmation process is performed on the error result. The error usually tested by a , must be confirmed by B . Serious errors can convene a review meeting for discussion and analysis, the test results to be strictly confirmed, whether there is really this problem and the severity of the.
Six, to develop a rigorous test plan. Be sure to make a test plan and be instructive. The test schedule is as loose as possible, and you do not want to complete a high level of testing in a very short period of time.
Seven, save the test plan, test case, error statistics and final analysis report, which is convenient for maintenance.
Test target
1. Discover some development risks that can be avoided by testing.
2. Implement tests to reduce the risk that is found.
3. Determines when the test can end.
4. Consider testing as a standard project during the development of a project.
The importance of testing
Because software is also a product, anti-products have to be tested before they can flow on the market. So it's understandable that software products need to be tested.
In the project life cycle, testing is the last step, and it is also an important link to the software quality.
As the saying goes, the knitting baskets are all in the shell. If the last link is not a good grasp. Then the previous work is outstanding. Design in good is a unqualified product.
Therefore, do not pound foolish, because no test products to the market and the entire product to ruin.
I think the reason for testing in the team is that it is difficult to know the quality of the software before it is released, like the ISO quality certification, and that the test also requires quality assurance, which requires software testing in the team. In the process of testing to find software bugs, to timely let developers know and get the corresponding solution, in the forthcoming release, from the test report to draw the quality of the software.
Obviously, good software quality is inseparable from the cooperation of testing team, and how to carry out testing activities in the team, the individual believes that the establishment of a relatively perfect test system can be better in the team to carry out testing, so-called no rules inadequate surrounding area, there is no perfect complete test system, that in the actual testing work is certainly more chaotic.
Here are a few examples of how software testing solves problems
ERROR Example1
void Main (void) { char aaa; while (1) { if(onesecondpassed ()) aaa++; if (AAA >$) { class_is_over (); } Else { lesson_to_lecture (); }}}
Because the range of char is 128 to 127, and then the scope of the program is 200, an overflow occurs, resulting in an error
ERROR Example2
void Main (void) { char uc_aaa; while (1) { if(onesecondpassed ()) uc_aaa++; if (Uc_aaa >) { class_is_over (); } Else { lesson_to_lecture (); }}}
There is no sign of the unsigned char type, so it can be expressed from 0~255, so that when uca++ is not in the 300 it will occur overflow.
Exercise2
#include <stdio.h>int main (void) { char buff[]; memset (Buff,0,sizeof(buff)); Gets (buff); is [%s]\n ", buff); return 0 ; }
The problem with the above code is the use of the function get (), which receives a string from stdin without checking the volume of the cache it replicates, which could cause the cache to overflow. It is recommended to use the standard function fgets () instead.
Leap Year definition
BOOL int Year ) { return0400);}
Public Static BOOLIsleapyear (intYear) {System.Diagnostics.Debug.Assert (year >=1900);if(Year% -==0)return true;if(Year% -==0)return false;if(Year%4==0)return true;return false; }
The second C # code is wrong, so if you change it to else if, because if it is, each one will be judged and an error will occur.
Getting Started with software testing