Designed for Testability

Source: Internet
Author: User

Designed for TestabilityOriginal article: design for testability-Bret pettichord SummaryThis article provides some practical suggestions to help the project team develop software products with higher testability. This article defines testability as visibility and controllability. Visibility is the degree to which we can observe the status, output, resource utilization, and other impacts of the software under test; controllability is the degree to which we can input to the tested software or set it to a specific State. Visibility BasicsThe basic aspect of visibility is access to code, design documents, and change records. These are prerequisites for improvements to most testability. Testers need to know how to read the code and how to understand the language used to design the model. Before testers can propose test interfaces, error injection hooks, or other testability features, they need to have a basic understanding of the system design. Testability improvements require both testers and developers to use the same language. Detailed outputMany programs have a detailed output mode, which is a good example of testability. It allows you to see the details of software operation. The UNIX mail program is one example: Mail-V bret@pettichord.comSubject: testability examplesample text .. cc: bret@pettichord.com... connecting to mx.io.com. via relay... 220-deliverator.io.comesmtp Sendmail 8.9.3/8.9.3; Fri, 12 Jan 2001 15:34:36-00 220 welcome toilluminati online, fnord! >>> EHLO eris.io.com250-deliverator.io.com Hello IDENT: wazmo@eris.io.com [199.170.88.11], pleased tu250-8BITMIME250-SIZE 500213250-dsn250-onex250-etrn250-xusr250 help> mail from: <wazmo@eris.io.com> size = 67250 <wazmo@eris.io.com>... sender OK> RCPT TO: <bret@pettichord.com> 250 <bret@pettichord.com>... recipient OK >>> data354 enter mail, end with ". "on a line by itself >>>. 250 paa07752 message ACSS Cepted for delivery bret@pettichord.com... sent (paa07752message accepted for delivery) Closing connection to mx.io.com. >>> the detailed output information of quit221 deliverator.io.com closing connection can help testers understand the communication process between the client and the server, so as to help design test cases to test the server's error handling capability. At the same time, this information can help expose the problem. LogsDetailed output information is one of the techniques used to record software events. Logs help testers better understand the running status of software. You can also find bugs that are easy to ignore. When a bug occurs, the log can help locate the error code and help debugging. Diagnosis, monitoring, and error InjectionAssertion is a common diagnosis. Assertions are additional code lines that make the program clearer and clearer about the input to be processed. When the assertions are violated (if not true), errors or exceptions automatically occur. So if the assertions are violated, it means a bug. Without assertions, you may not notice that the bug has occurred, because internal data may have been damaged, but errors only occur when further tests access the data. Assertions can also help locate the Code where an error occurs. An effective way to find out memory leaks is to monitor memory usage. There are many tools to do this. If you can monitor internal memory settings, it will make testing easier. For example, input "about: config" in Netscape to output all settings. It will be of great help for tracking configuration problems, especially some problems only occur on specific machines. Sometimes testers need to access internal data. The test point allows testers to check data or insert data at a certain point in the system. This method is particularly useful for Data Flow applications. The error injection feature helps test error handling code. It is difficult to make many environmental errors appear, especially in a predictable and reproducible manner. For example, full disk, bad media, and network disconnection. The error injection technique is to add hooks to inject these errors and trigger the software's error handling code. Another method of error injection is to use the tool heat or holodeck, which plays the intermediary role between the program and the operating system. Because of its location, it can control various services provided by the operating system to programs, including memory, disk space, and network, to trigger various environmental problems, it depends on the processing capability of the program. Test InterfaceManual testing is easier to use GUI interfaces. Automated Testing is easier to use programming interfaces. Earlier versions of Excel contain a test interface. Because the accuracy of mathematical computing is a key requirement, it is very important to run tests frequently in an automated manner. Later, the Excel test interface was made public to users. Now we can access it Through VB. User Interface TestabilityA common problem for GUI automated testing tools is personalized controls. Custom Controls are those that are not recognized by GUI testing tools. The procedure for evaluating and ensuring the testability of software products under the specified gui testing tool is as follows: 1. Test the compatibility between GUI testing tools and development tools as soon as possible. 2. Define the Naming Standard for user interface elements. 3. Search for personalized controls. If yes, it is planned to provide testability support a. Ensure that the tool can identify the control object B with the name, type, and location, and ensure that the name used by the control is unique. Otherwise, if multiple forms or controls use the same identifier, the tool may not recognize them. C. Make sure that the tool can check the control content. Text in the text box. Check whether a check box selects D and make sure that the tool can control the control. Click. To select the required menu items, you usually need to experiment over and over again to find the methods and techniques for operating personalized controls, such: 1. keyboard operation 2. Initialization Control 3. Mouse event 4. Character Recognition 5. Clipboard access 6. External access Conclusion: TestabilityAutomation requires testability. Successful automation requires attention to testability. Programming interfaces provide more efficient automated test support than user interfaces. Conclusion: Enable TestabilityTesters must be aware that testability requires a clear understanding of software design, review existing design documents and read code. Testers are often reluctant to require testability because they are afraid that their requests will be rejected. However, we usually find that the request testability already exists in some places or has been planned for other reasons.

 

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.