【24h】

Dynamic Design Analysis: Testing Without Code

机译:动态设计分析:无需代码即可进行测试

获取原文
获取原文并翻译 | 示例

摘要

This paper presents a technique for representing and analyzing the dynamic behavior of a design before time and effort is spent to build it. The technique is based on a mathematical model of objects, software, and software designs and provides operations and inference rules to manipulate not only the objects in a design, but the design itself (see Whitmire, 1997). The technique involves defining an initial state for a scenario and seeding that state with an event that takes the form of a message that originates outside the design. We follow the messages generated as side effects in a breadth-first order until we reach a new steady state, one in which no object changes state without another external event. Working through various scenarios, it is fairly easy to determine which messages will succeed and which will not. The difference between testing a design in this way and testing a design that we've put into code is the time spent writing the code. The schemas above are very easy to modify, especially when compared to the effort to modify any code. For example, I added the feature to send AddEntry an object reference and have the operation create the ListEntry object in a couple of minutes while editing this paper. Modifying code to the same extent would have taken many hours. One additional, if unobvious, benefit of dynamic design analysis is that that you've analyzed a large part of the design, you have complete design contracts for all of the methods you have to build. The specific implementation of each method still needs to be determined, but the rest of the design's view of that method has been fixed and verified. Using this technique does not guarantee that you will find all of the errors in your design. You still have to imagine the combinations of external events and starting states that can cause your design to fail, and it is likely that you'll miss one or two. It will, however, provide you with documented results of the combinations you did analyze, giving you a good start on your set of test cases, including the expected results. This works for combinations that lead to errors, as well as those that succeed in passing a message. The technique also encourages you to state explicitly all of your assumptions. Hidden assumptions, such as which objects are actually in scope, are a leading cause of design errors. Like those who build bridges, machines, and electronic circuits, we can be more confident in our approach to solving a problem if we can show that our approach will indeed work before we build it. Testing a design before building it should lead to more accurate estimates because it eliminates the time required to rework code due to an error in the design, something not included in any estimate. Like steel, concrete, and electronic components, software code is very expensive to modify, so expensive, in fact, that we can no longer afford to build large, complex systems several times while trying to deliver it the first time.
机译:本文提出了一种用于表示和分析设计的动态行为的技术,该设计需要花时间和精力来进行构建。该技术基于对象,软件和软件设计的数学模型,并提供操作和推理规则,不仅可以操作设计中的对象,还可以操作设计本身(请参见Whitmire,1997)。该技术涉及为方案定义初始状态,并为该状态播种事件,该事件采用源自设计之外的消息形式。我们以广度优先的顺序跟踪作为副作用生成的消息,直到达到新的稳定状态为止,在该稳定状态中,没有其他外部事件就不会改变对象的状态。在各种情况下工作,很容易确定哪些消息将成功,哪些消息将不会成功。以这种方式测试设计与测试已经放入代码中的设计之间的区别是花在编写代码上的时间。上面的模式很容易修改,特别是与修改任何代码的努力相比。例如,我添加了向AddEntry发送对象引用的功能,并让该操作在编辑本文的几分钟内创建了ListEntry对象。相同程度地修改代码将花费很多时间。动态设计分析的另一个好处(如果不是显而易见的)是,您已经分析了很大一部分设计,就必须构建的所有方法都拥有完整的设计合同。每种方法的具体实现仍然需要确定,但是该方法的其余设计观点已得到修复和验证。使用这种技术并不能保证您会发现设计中的所有错误。您仍然必须想象可能导致设计失败的外部事件和启动状态的组合,并且很可能会错过一两个。但是,它将为您提供您分析过的组合的文档化结果,从而为您建立一组测试用例(包括预期结果)提供了良好的开端。这适用于导致错误的组合以及成功传递消息的组合。该技术还鼓励您明确陈述所有假设。隐藏的假设(例如哪些对象实际在范围内)是设计错误的主要原因。像那些建造桥梁,机器和电子电路的人一样,如果我们能够证明我们的方法在构建之前确实可以奏效,那么我们对解决问题的方法就会更有信心。在构建设计之前对设计进行测试应该可以得出更准确的估算值,因为它省去了由于设计错误而导致的返工代码所需的时间,而估算值中并未包含这些内容。像钢,混凝土和电子元件一样,软件代码的修改非常昂贵,实际上,它是如此的昂贵,以至于我们在第一次交付时,再也无法承受多次构建大型复杂系统的负担。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号