`
canonical
  • 浏览: 367095 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Sample Driven Development

阅读更多
    软件开发是从设计开始的, 而设计的产物是一堆描述性的文档. 我们总是希望这些描述能够尽量完备, 例如在一个用例描述中我们总是希望加入尽量多的异常流描述, 尽量把所有的相关情况都同时呈现出来. 当我们对系统进行了大量的分解和分析工作之后, 往往会遇到一种理解上和验证上的困难, 即我们如何才能确保某个use case的运行结果恰好能够满足另外一个use case的输入需求, 整个系统能否精密的配合在一起. 此时我们可以依赖一些整体架构设计的文档描述, 或者补充更多的系统连接上的说明, 但是无论如何, 要在思维中同时把握那么多条执行路径是一件艰难的事情.
    设计文档可以说是对系统行为的一种抽象性的规约, 为了验证这种抽象描述的正确性, 在缺乏理论保证的情况下, 我们唯一的选择就是抽样检验, 即我们需要构造一些测试用例, 特别是那些描述了一个完整业务流程的全局性的测试用例(用户故事). 在测试用例中, 我们并不需要构造出所有完整的执行路径, 只需要对一些关键性的业务路径进行检验就可以了, 局部的异常流处理很多时候都可以通过局部的单元测试来检验.
    测试用例最好以测试代码的方式提供,而不是一组文本描述. 我们应该尽量在开发的早期使得全局测试用例就能够运行起来, 使它成为系统演化的驱动力之一, 并根据系统开发的进展同步的进行调整. 测试驱动开发(Test Driven Development)所指的绝不仅仅是对单个类所进行的单元测试(Unit Test). Test的一个重要作用在于实例化所有必要的抽象约束条件, 通过sample来驱动系统的发展.
分享到:
评论

相关推荐

    Test-Driven Development with C#

    Test-Driven Development with C# Test-Driven Development with C#是一本关于测试驱动开发(TDD)的书籍,旨在帮助开发者使用C#语言实现TDD。该书籍涵盖了TDD的基本概念、原则和技术,同时也探讨了TDD在实际项目中...

    selenium framework design data driven testing

    资源宝贵,请及时下载 Book Description The Selenium WebDriver 3.x Technology is an open source API available ...Run the sample framework and see the benefits of a live data-driven framework in real-time

    Android 6 for Programmers, AN APP-DRIVEN APPROACH THIRD EDITION (pdf)

    Each chapter begins with an introduction to the app, an app test-drive showing one or more sample executions and an overview of the technol- ogies we used to build the app. Then we present a detailed...

    iOS 10 SDK Development: Creating iPhone and iPad Apps with Swift

    From the community-driven changes in Swift 3 to the overhaul of iOS' Foundation framework to make it more "Swifty," iOS 10 and Xcode 8 mark an "all in" commitment to Swift, and this new edition ...

    Expert One-on-One J2EE Design and Development

    The book is driven from the need to solve common tasks, rather than by the elements of J2EE. It discuss risks in J2EE development It takes the reader through the entire design, development and build ...

    Agile.Java.Development.with.Spring.Hibernate.and.Eclipse

    Also, Extreme Programming (XP), Agile Model Driven Development (AMDD) and refactoring are methods that can expedite the software development projects by reducing the amount of up front requirements ...

    Agile.Java.Development.with.Spring.Hibernate.and.Eclipse-part3

    Also, Extreme Programming (XP), Agile Model Driven Development (AMDD) and refactoring are methods that can expedite the software development projects by reducing the amount of up front requirements ...

    Data-driven Graphic Design Creative Coding for Visual Communication

    The development of the computer as a design environment has encouraged a new breed of digital designer; keen to explore the unique creative potential of the computer as an input/output device. Data-...

    Mastering TypeScript-Second Edition[February 2017]

    Chapter 8, Test Driven Development, starts with a discussion on what Test Driven Development is, and then guides the reader through the process of creating various types of unit tests. Using the ...

    sample_pullrequest_driven

    学习请求请求驱动的开发 大纲 该存储库用于学习请求请求驱动的开发。...## Features of development - [ ] foo Bar - [ ] foo Bar - [ ] foo Bar - [ ] foo Bar ## Additional Tasks If new tasks are added after s

    google architecture sample

    9. **Test Driven Development(TDD)**: 这些示例项目往往包含丰富的单元测试和集成测试,遵循TDD原则,先编写测试,再实现功能,以确保代码质量。 10. **Single Responsibility Principle(SRP)**: SRP是...

    test-driven-development-dockerfile:Dockerfile 在 OSX 上由 RSpec 测试驱动开发的示例

    Dockerfile 的测试驱动开发 这是 RSpec 的 Dockerfile 测试驱动开发 (TDD) 示例项目。 这意味着通过以下循环开发 dockerfile, 编写 Rspec 测试 ... 构建镜像, docker -H :5422 build -t tcnksm/sample

    sample_app:RailsTutorial sample_app

    此外,“sample_app”还涉及测试,Rails鼓励TDD(Test-Driven Development)。`test/`目录下包含各种测试用例,如单元测试和集成测试,确保代码的正确性和稳定性。 总的来说,“sample_app”是一个典型的Rails教程...

    Tkinter GUI Application Development Blueprints(PACKT,2015)

    You will learn to write multithreaded programs, network programs, database driven programs and more. You will also get to know the modern best practices involved in writing GUI apps. With its rich ...

    Unity in Action(Manning,2015)

    Each sample project illuminates specifi c Unity features and game development strategies. As you read and practice, you'll build up a well-rounded skill set for creating graphically driven 2D and 3D ...

Global site tag (gtag.js) - Google Analytics