SOFTWARE TESTING AND CODE SECURITY DETAILS
To test a software, we first need to know the purpose of our own testing, not blind, to have quality assurance, understand reasonable software testing.
The purpose of testing a software is to find errors in the testing process, until no errors are found, but you cannot guarantee that the software is perfect. It can only be said that you did not detect the error, the error is still possible.
The purpose of software testing is to ensure that the software does what you expect it to do and is done in the right form. Test software to provide developers and managers with information about software risk assessment. Software testing can only improve the quality of software, and software testing can draw good conclusions for the next software development process.
Software lifetime model
The waterfall model
Prototype model
The incremental model
The spiral model
What is a waterfall model
A: for the waterfall model, I know there are six stages: planning, requirements analysis, design, coding, testing, and running maintenance.
Planning -- > requirements analysis -- > design -- > coding -- > testing -- > operation and maintenance, is it hard to memorize?
What is a prototype model
A: it is to build a prototype system that can reflect users' needs. How to improve and refine the prototype system repeatedly and build a target system that meets users' needs.
What is an incremental model
A: for an incremental model, keep in mind that a formal, publishable version is generated at each stage, and that each software version is progressively refined.
What is a spiral model
Answer: spiral model is a waterfall model and prototype model combined, remember that this model has four stages, the four stages are mainly, one is the plan, the second is the risk analysis, three is the implementation of project, four is the review.
Definition of software quality
Definition of software quality: meet user requirements, meet software testing requirements, and maintain a reasonable schedule and cost
Definition of software error:
To software testing to find errors in the software program, because in software development, may in the software requirements, design and coding phase is likely to go wrong, in order to ensure the quality of the software you need to software testing, software through constantly verification and validation, ensure the quality of the software!
On software testing is to find possible errors, improve the quality of the software, but cannot improve the quality of software by software testing, cannot be misinterpreted as through software testing to improve software quality, this is wrong.
In addition, it is impossible to say that the software test does not mean that the error does not exist. The software test is to ensure that the error rate is reduced.
In a nutshell, software errors are software errors that do not meet the end user's requirements.
The name of software testing
When studying software testing, you often hear these words:
Software testing can improve software quality, but you don't want to improve software quality by relying on software testing.
Software testing can detect errors in the software, but it can not guarantee that errors do not exist.
The difficulty of software testing lies in how to effectively test the software and when to end the test.
0% of errors are clustered in 20% of modules. (key)
Don't do everything at once.
The test case
Writing test cases depends on the software requirements and cannot be written out of thin air. If the software requirements are wrong, the test cases will also be wrong. If the test case is incomplete or not well written, you may not find errors, and a good test case can improve efficiency and identify undiscovered defects.
All testers are there to find software errors, causes, etc.
Classification of software testing
Based on software structure and algorithm
Black box testing and white box testing
Based on the execution of the tested software
Static and dynamic testing
Based on different stages
Unit test, integration test, system test, acceptance test
Black box test is also called functional test, which is applicable to user test, which can be understood as performance test, surface test ~
White box testing, also known as structural testing, testing the code structure, may belong to the programmer's test ~
Static is like checking a car in a garage, and dynamic is like driving to check
Unit testing, integration testing, system testing, and acceptance testing at different stages of testing are incremental tests from small to large.
A unit test is a module of a unit for testing. Because it is a unit, it cannot run independently, so the available running test program needs to be written. Integration testing, understanding is mixed with white box black box testing methods. Integration testing is connected by a single module, which can be understood as unit testing. Each module is integrated into an integration module, and problems such as the interface between modules can be found.
System test adopts black box test to check whether the system meets the software requirements, unit test to integration test to system test to acceptance test.
Software testing process
Make test plan
Establish the appropriate test environment
You need to write test solution documentation
You need to write test case documentation
Perform the test
Make good use of test tools
You need to submit a Bug submission document
You need to write a summary report document
Conduct analysis and evaluation
Black box testing
Equivalence class division, edge value analysis
Causality diagram, decision table method, scene method, false speculation
Equivalent classification
Equivalence classification: there are two kinds of effective equivalence classes and invalid equivalence classes
Valid equivalence class means that the input data is reasonable, meaningful, and in accordance with the specification of the program.
Invalid equivalence class means that the input data is unreasonable, meaningless, and does not conform to the specification of the program.
Boundary analysis
For the boundary analysis method, the boundary value of the equivalence class is selected as the test case based on the equivalence class division.
False inference
The false inference method, which relies on experience or intuition to predict that something might go wrong, lists those that are likely to go wrong and those that are likely to go wrong, and selects them as test cases.
Causality diagram method
Cause and effect diagram method, understood as the "for" is regarded as the input conditions, the "fruit" is regarded as the output condition, there is because there is fruit, cause and effect diagram is a formal language, can choose according to the relationship of efficient test cases.