




免费预览已结束,剩余9页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
毕业设计(论文) 外文资料 原文Software Testing: Black-Box TechniquesSmirnov SergeyAbstract Software systems play a key role in different parts of modern life. Software is used in every financial, business, educational etc. organization. Therefore, there is a demand for high quality software. It means software should be proper tested and verified before system-integration time. This work concentrated on so-called black-box technique for software testing. The several black-box methods were considered with their strengths and weaknesses. Also, the potential of automated black-box techniques for better performance in testing of reusable components was studied. Finally, the topic related to software security testing was discussed.1. IntroductionComputer technologies plays an important role in the modern society. Computers and Software that drives them affect more people and more businesses than ever today. Therefore, there is a pressure for software developers not only to build software systems quickly, but to focus on quality issues too. Low quality software that can cause loss of life or money is no longer acceptable. In order to achieve a production of highquality software the whole process of developing and maintaining of the software has to be changed and developers have to be correspondingly educated and trained. Testing takes an important part in any software development process (Fig. 1.1). As a process by itself it is related to two other processes verification and validation. Validation is a process of evaluation a software system or component during or, at the end of, the development cycle in order to determine whether it satisfies specified requirements 8. Verification is the process of evaluating a software system or component to determine whether the products of a given development phase satisfy the conditions imposed at the start of that phase 8.Software testing is a process or several processes designed to make sure computer code does what it was designed to do and that it does not do anything unexpected 2. The software testers are responsible to design tests that reveal defects and can be used to evaluate usability and reliability of the software performance. To achieve these goals testers must select a finite number of test cases 1. There are two basic techniques that can be used to design test cases: Black-box (sometimes called functional or specification); White-box (sometimes called clear or glass box). The white-box technique focuses on the inner structure of the software under test (SUT). To be able to design test cases using this approach a tester has to have a knowledge of the software structure. The source code or suitable pseudo code must be available 1. Figure 1.1: A Software Development ProcessBy using the black-box approach the software is viewed as a black box. The goal of a tester is to be completely unconcerned about inner structure of the software. Instead, concentrate on software behavior and functionality (Table 1). Table 1: Two basic testing techniquesTechnique Knowledge SourceBlack-BoxRequirements documentsSpecificationsDomain KnowledgeDefect Analysis DataWhite-BoxHigh-level designDetailed designControl flow graphsWhy do we need black-box testing? First, this approach is useful for revealing requirements and specification defects. Another reason is a testing of reusable software components. Many companies use components from an outside vendors that specialize in the development of specific types of software, so-called Commercial Offthe- Shell Components (COTS).Using such components can save time and money. However, the components 1 have to be evaluated before becoming a part of any developed system. In most cases when a COTS component is purchased from a vendor, no source code is available and even if there is some, it is very expensive to buy. Usually just an executable version of the component is in the hands. In this case black-box testing might be very useful. Next sections of the work present the black-box methods and some issues related to an automation of the methods and software security testing. 2. Black-Box Software Testing Methods By using black-box approach we are considering only inputs and outputs as a basis for designing test cases. However, we should keep in mind that due to finite time and resources an exhaustive test of all possible inputs is not possible. Therefore, it is a goal of a tester by using available resources to produce the test cases that give a maximum number of found defects. There are several methods that can help to achieve the above mentioned goal. Random TestingEach software system has an input domain from which input data is selected for testing. If inputs are randomly selected this is called random testing. The advantage of the method is that it can save time and effort that more detailed and thoughtful test input selection methods require. On the other hand, random test inputs in many cases can not produce effective set of test data 2. Equivalence Class Partitioning An Equivalence Class Partitioning (ECP) approach divides the input domain of a software to be tested into the finite number of partitions or eqivalence classes. This method can be used to partition the output domain as well, but it is not commonly used. The result of the partitioning allows a tester to select one member of each class and based on it create test cases. It is assumed that all other members of the same equivalence class are processed the same way by the software under test. Therefore, if one test case based on chosen member detects a defect, all the other test cases based on that class would be expected to detect the same defect. And vice versa, if the test case did not detect a defect, we would expect that no other test cases in the equivalence class would produce an error. This approach has the following advantages 1: Elimination of the needs for exhaustive testing through the whole input/output domain, that is not possible; Following the approach a tester selects a subset of test inputs with a high probability of detecting the defects. A test case design by ECP has two steps: 1) Identifying the equivalence classes;2) Defining the test cases. We identify the equivalence classes by taking each input condition and partitioning it into two or more groups: valid equivalence classes, that include valid input to the software, and invalid equivalence classes, that represent all other possible states 2. There are a set of rules that can be used to identify equivalence classes 2: If an input condition specifies a range of values, identify one valid equivalence class within this range, and two invalid classes out of range on the left and right side respectively. If an input condition specify a number of values, specify one valid equivalence class within the values, and two invalid equivalence classes out of the number. If an input condition specify a set of input values and there is a believe that the software handles each value differently, identify a valid equivalence class for each and one invalid equivalence class. If an input condition specify a must be“ situation, identify one valid equivalence class and one invalid equivalence class. However, there are no fast rules for identification of equivalence classes. With experience a tester is able to select equivalence class more effectively and with confindence. If there is a doubt, that the software does not process the members of the equivalence class identically, the equivalence class should be split into smaller classes. The second step of defining the test cases is as following 2: 1. Assign an unique number to each equivalence class; 2. Write a new test case trying to cover all valid equivalence class; 3. Write a new test case for each invalid equivalence class. Boundary Value Analisis The Equivalence Class Partitioning can be supplemented by another method called Boundary Value Analysis (BVA). A tester selects elements close to the edges of the input, so that the test case covers both upper and lower edges of an equivalence class 1. The ability of creating a high-quality test cases with the use of the Boundary Value Analysis depends greatly on the testers experience as in case of the Equivalence Class Partitioning approach. Cause-Effect Graphing The major weakness of Equivalence Class Partitioning and Boundary Value Analysis is that the methods do not allow to combine conditions. Furthermore, the number of possible combination is usually very large. Therefore, there must be a systematic way of selectiong a subset of input combinations.Cause-Effect Graphing provides a systematic approach for selecting a set of test cases. The natural-language specification is translated into a formal language a cause-effect graph. The graph is a digital-logic circuit, but in order to build a graph no knowledge of electronics is necessary. The tester should understand only the boolean logic. The following steps are used to produce test cases 2: Divide the specification into workable parts. Large specifications make a cause-effect graph difficult to manage. Figure 2.1: Simple Cause-Effect Graphs Identify the causes and effects in the specification. A cause is a distinct input condition or an equivalence class of input conditions. An effect is an output condition or a system transformation. The causes and effects are identified by reading the specification. Once identified, each cause and effect is assigned an unique number. From cause and effect information a boolean causeeffect graph that links causes and effects together is created. Annotations with constraints are added, that describe combinations of causes and/or effects which are impossible. The graph is converted to a decision table. The colomns of the decision table are converted into test cases. The simple examples of cause-effects graphs are shown in Figure 2.1. The more detailed description with examples of this method can be found in 1 and 2. Error Guessing Design of test cases using error guessing method is based on the testers past experience and intuition. It is impossible to give a procedure for an error guessing approach since it is more intuitive and ad hoc process. The basic idea behind is to enumerate a list of possible errors and then write test cases based on this list. State Transition Testing State Transition Testing can be used for both objectoriented and procedural software development. The approach is based on the concept of finite-state machine and states. It views the software under test in term of its states, transitions between states, and the inputs or events that trigger state changes. A state is an internal configuration of a system. It is defined in terms of the values assumed at a particular time for the variables that characterize the system or component 1. A finite-state machine is an abstract machine that can be represented by a state graph having a finite number of states and a finite number of transitions between states 1.A State Transition Graph (STG) can be designed for the whole software system or for its specific modules. The STG graph consists of nodes (circles, ovals, rounded rectangles) that represent states and arrows between nodes that indicate what input (event) will cause a transition between two linked states. The Figure 2.2 shows a simple state transition graph 1. Figure 2.2: A simple state transition graphS1 and S2 are two states. The black dot is a pointer to an initial state from outside. The arrows represent inputs/actions that cause the state transformations. It is useful to attach to the graph the system variables that are effected by state changes. The state transition graph can become very complex for large systems. One way to simplify it to use a state table representation. A state table for the graph in Figure 2.2 is shown in Table 2 1. The State Table lists all inputs that cause the state transitions. For each state and each input the next state and action taken are shown. Table 2: A state table for the state transition graph in Fig. 2.2The STG should be prepared by developers as a part of the requirements specification. Once the graph was designed it must be reviewed. The review should ensure that the proper number of states is represented; each state transition (input/output/action) is correct; equivalent states are identified; unreachable and dead states are identified. Unreachable states are states that will never be reached with any input sequence and may indicate missing transitions. Dead states are states that once entered can not be exited 1. After the review the test cases should be planed. One practical approach is to test every possible state transition 4. 3. Automated Black-Box Testing A few black-box methods were listed above. The problem with those methods is that often the performance of testing depends greatly on experience and intuition of the tester. Therefore, there is a question if black-box testing can be automated to make testing more thorough and cost-effective. Furthermore, there is need in black-box methods, that can be used for testing reusable software components before integration into a system under development. The reusable components can be independently developed or commercially purchased. The quality of these components can vary from one vendor to another. The general strategy for automated black-box testing of software components was proposed in 5 . The strategy is based on combination of three techniques: automatic generation of component test drivers, automatic generation of test data, and automatic or semi-automatic generation of wrappers serving the role of test oracles. An approach that allows testers to take advantage of the combinatorial explosion of expected results was developed in 6. There is a possibility to generate and check the correctness of a relatively small sets of test cases by using software Input/Output relationships. Then the expected results can be generated for the much larger combinatorial test data set. It allows a fully automated execution. In 3 Richard Torkar made a comparison of the main black-box methods in order to find their weaknesses and strengths. It was mentioned that the methods such as Cause-Effect Graphing and Error-Guessing are not suitable for automation. The difficulty in case of Equivalence Class Partitioning would be to automate the partitioning of the input domain in a satisfactory way. Since the effectiveness of black-box techniques is close connected to experience of the tester, in our opinion they can be automated by using artificial intellegence methods such as neural networks and fuzzy logic. More information about research in this area can be found in 7. 4. Black Box Testing and Software Security At the present there is a pressure on software developers to produce high quality software. The security aspects are highly related to a software quality. Security testing should be integrated in the testing process, but in reality it is not true in most cases. Usually the developers test the software just for functional requirements and do not consider security issues. One way to check software for secure vulnerabilites is to study known security problems in similar systems and generate test cases based on it. Then applying black-box techniques to run these test cases. The black-box methods play an important part in securtity testing. They allow the testers to look at the software under test from the side of attackers, which usually do not have any information about attacked system and therefore consider it as a black-box. Security testing is important for e-commerce software systems such as corporate web-sites. Furthermore, since buffer overflow is a result of bad constructed software programs, security testing can reveal such vulnerabilities, what is helpful for checking both local programs such as games, calculators, office software etc. and remote software such as e-mail servers, FTP, DNS and Internet web servers. Conclusion Software testing became an essential part of the software development process. The well designed test cases can significantly increase the quantity of found faults and errors. The mentioned above black-box methods provide an effective way of testing with no knowledge of inside structure of the software to be tested. Nevertheless, the quality of the black-box testing depends in general on the experience and intuition of the tester. Therefore, it is hard to automate this process. In spite of this fact, there were made a several attempts to develop approaches for automated black-box testing. The black-box testing helps the developers and testers to check software under test for secure vulnerabilities. The secure testing is a matter of importance for e-commerce applications, that are available in the Internet for a wide range of people, and for revealing buffer overflow vulnerabilities in different local and remote applications. 8毕业设计(论文) 外文资料 译文软件测试:黑盒技术Smirnov Sergey摘要:在现代社会中,软件系统占了一个重要的位子。软件运用于各个领域,如:金融、商业、教育等组织。因此,我们对软件的质量要求越来越高。这就意味着:在验证系统整合前,我们需要对软件进行适当的测试。这个工作非常集中,所以称为黑盒软件测试技术。黑盒测试方法考虑他们的长处和不足。同时,自动化黑盒技术的潜力有更好的表现可复用组件的测试进行了研究。最后,有关于软件安全测试的课题已在被研究了。1、介绍计算机技术在现代社会中扮演了一个重要的角色。如今,计算机和软件影响着越来越多的人们和商业。因此,软件开发者的压力不仅要快速的建立软件系统,也要注重质量问题。质量差的软件造成生活或者金钱的损失不再是可以接受的。为了能够生产出高质量的软件,整个发展和维护的过程不得不有所改变,而开发者需要接受过相应的教育和训练。在任何一个软件发展过程中,测试是非常重要的(图1.1)。作为一个过程本身,它涉及到两个其他工艺验证和确认。Pic1.1图1.1软件发展过程验证是评价一个软件系统或组件的过程,在最后,开发周期决定是否满足特殊要求。8验证是评价一个软件系统或组件的过程,并决定产品在开始阶段是否满足给定的发展阶段的条件。8软件测试是设计一个或多个确保计算机代码可以完成原本设计的内容的过程。2软件测试人员需要设计测验,可以发现错误,也能估计软件的可用性和可靠性。为了达到这些目标,测试人员必须选择一个有限数目
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 工业节能技术与解决方案
- 工业设计的新趋势与挑战
- 工业设计的发展趋势与创新
- 工作习惯优化从小事做起
- 工作场所中的危机公关处理
- 工程塑料在注塑制品中的应用与发展研究
- 工程师培训中的数据采集与处理方法
- 工程勘察与数据处理的一体化趋势
- 工程地质勘察中的无人机技术应用
- 工程结构分析与机械设计的融合
- 2021年高级经济师(人力资源)考试真题及参考答案
- 烟酒店创业计划书范文
- 旅游目的地管理(双语)知到智慧树章节测试课后答案2024年秋海南热带海洋学院
- 《报检与报关实务(李贺)-上海财经大学出版社》课后答案
- 《建材产品追溯中国ISO标准砂》
- 2015年江苏省南通市中考真题语文试题(解析版)
- 大学物业服务月考核评价评分表
- 成人失禁相关性皮炎的预防与护理
- 泉州律师见证委托合同范本
- 车位转让协议书范文原
- 毕业研究生登记表(适用于江苏省)
评论
0/150
提交评论