Current location - Education and Training Encyclopedia - Graduation thesis - How to improve the quality and reliability of software through testing?
How to improve the quality and reliability of software through testing?
1, related concepts of software testing (1) Software testing: Software testing is the process of executing programs in order to find errors. In other words, software testing is a process of carefully designing a batch of test cases according to the specifications of each stage of software development and the internal structure of the program, and using the running results of these test cases to find program errors. (2) Software test case: A test case is actually a description of all possible goals, movements, actions, environments and results in the software running process. Test case is the smallest unit of testing organization, which describes the testing task of a specific software product and embodies the testing scheme, method, technology and strategy. The contents include test objectives, test environment, input data, test steps, expected results, test scripts, etc. , and finally form a document. The core of software testing is to design and execute test cases. The problem of test case selection can be regarded as searching for which state combinations can find errors from the huge input state combinations. Therefore, it is necessary to use abstract means to make the test as effective as possible. (3) Test case library: A complete unit test rarely executes only one test case, and developers usually need to write multiple test cases to test a software function completely. These related test cases are called test case sets. Collecting a large number of test cases into the test case library and classifying them reasonably for testers to choose and use can greatly improve the discovery rate of software problems. 2. Methods to improve test quality 2. 1 Software testing Using testability design technology is the only effective way to verify whether the software can complete the expected function. However, in the implementation of the test, due to various reasons, the test is quite difficult and even impossible to test. In order to improve the testability of software, we should follow the principle of testability design in software design, and improve the testability of software by changing the design or code and adding a special test structure for software. Design of (1) test driver. This design is to directly convert software requirements into test code. On the basis of determining the performance requirements of software testing, priority should be given to writing test codes. Write the acceptance test first, then write the unit test, and constantly modify it during the development process. (2) Each operation corresponds to a method, so that the method is miniaturized. Using miniaturized method descriptions and overloaded methods with default method parameters makes it easy to call these methods in tests. (3) separation of display and control. By moving the code out of the GUI view, various GUI operations can become simple method calls on the model. Modifying the program function in this way will not affect the view, and it is easier to call the test function through the method than indirectly test the function. (4) Create interfaces for classes that may be used as parameters. Use interfaces to describe external program components or change interfaces to form empty classes and pass them in as parameters. 2.2 Choosing an appropriate test management model is a formal or semi-formal representation of system functions and supports system enumeration of input state combinations. Model-based testing mainly considers the function of the system and can be considered as a kind of functional testing. The test model embodies the most essential functional relationship of the tested system. But also easier to develop and analyze than the system itself. A testable model should provide enough information to generate test cases. Therefore, the testable model must meet the following requirements: (1) must be a completely accurate reflection of a test implementation, and the model must represent all the features to be checked; (2) It is the abstraction of details; (3) It can represent all events and all actions; (4) Various states of the system can be expressed, so that we can use knowable methods to determine what state we have reached or what state we have not reached.