Principle of inaccuracy in software testing

Source: Internet
Author: User

Principle of inaccuracy in software testing
1. inaccurate determination principle in February 1927, German physicist hienburg first proposed uncertainty in quantum mechanics. In a quantum mechanical system, the position of a particle and its momentum cannot be determined at the same time. This is the famous principle of uncertainty. Based on the uncertainty principle of heenburg, after applying observations to any system, it will inevitably have more or less impact on the system. Or, if you want to observe a system, strictly speaking, it is not the original system. How should we observe the system and minimize the impact on the system? 2. Software Testing Methods software testing methods include black box testing and white box testing. Black box testing, this test does not need to understand the internal structure of the software. It is a test of the program from the user's point of view. It only knows the input, output, and system functions of the program. Includes function testing, system testing, limit testing, and performance testing. White box testing, also known as structure testing, logic-driven testing, or program-based testing. The tester needs to know the internal structure and algorithm of the program to be tested. This is a test of the program from the perspective of the program designer. Traditional white-box testing methods: One-Step testing is to use an integrated development environment (IDE, such as VC and Eclipse) for one-step debugging, you can perform one-step debugging at the statement level, function level, and object level. The use of JUnit also belongs to the scope of single-step debugging, but its granularity is at the function level. It is a unit test and has not changed much in nature. In this method, the Code is not "real". The Code always needs to stop and stop, run a program or a piece of code, and then stop and observe the running results. This testing method has a great impact on the system and is not suitable for testing system performance and functional tests. The log test method is to embed a large number of printf statements in key code, output logs or directly display them, and then analyze the logs. In linux, it is always a method. In this test, the code is actually run, not only debugging functions, but also testing the performance of the Software. However, a large number of printf statements need to be embedded in the code, which affects the performance of the software, however, this test has less impact on system performance than single-step debugging. In the log test method, the Code does not need to be stopped. When the code runs to a place with a printf statement, the log is printed. Afterwards, we need to analyze the log to understand the code running status, for example, you can view the logs about errors and program running status. This method is similar to the black box of an airplane. It is post-event analysis and processing. This is a passive way of observing the system. The assertion test method is also called an assertion test method. It is also called a DBC-based test. The programmer predicts a function or variable and inserts an assertion statement to determine whether it meets your prediction, however, to add a large number of asserted statements, the output of the assertions can be displayed or recorded in the log. This is an active way to observe the system. It can test the performance of the software system. 3. the QS (Quantum Spy) in the QS test method QP (Quantum Platform) [1] is a combination of the asserted and log methods. The QS test method is to record the event in the target board, record the content in the RAM buffer, and then run the idle time on the Target Board through the serial port or UDP protocol, transfers the content cached by RAM to the upper computer (PC), analyzes the event afterwards, and checks whether the program runs correctly. QS separates record events from transfer events, and the transmitted data is compressed. The Software Test Method of QS does not require a single-step debugging method or a printf statement, but strictly speaking, it is a combination of assertion test and log test, the test code macro needs to be embedded in the key part, but the test structure of QS implementation is better, unlike that of printf statements, which are fragmented and arbitrarily placed. QS is based on the QP framework. The test code module is added to key code. event monitoring is dynamically changeable. Two-layer event filtering mechanism can be used to dynamically change the event to be monitored, block events that do not require observation. The new version of QS adds an event injection mechanism to actively initiate a specific event and observe the system's response to this event. This is an active test method that has little impact on the system. QS can not only test the functions of the program, but also test the program performance. It can test the system and minimize the impact on the system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.