*The hardest single part of building a software system is deciding precisely what to build. No other part of the conceptual work is as difficult as establishing the detailed technical requirements … No other part of the work so cripples the resulting system if done wrong. No other part is as difficult to rectify later.*
换句话说,等价划分提供了一个标准来回答问题*我们需要多少测试**?*这个想法是将所有可能的输入测试数据(通常是大量的组合)划分为一组值,我们假设 SUT 以相同的方式处理这些值。我们称这些值集为等价类。其思想是测试等价类内的一个有代表性的值被认为是足够的,因为假定所有的值都以相同的方式被 SUT 处理。
CI 的概念于 1991 年由 Grady Booch(美国软件工程师,最著名的是与 Ivar Jacobson 和 James Rumbaugh 一起开发 UML)首次提出。**极限编程**(**XP**)方法学采用了这个术语,因此非常流行。根据 Martin Fowler,CI 的定义如下:
*Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.*
我们应用程序的历史从一个假想的人开始,他喜欢猫。此人拥有一个 clowder,他/她希望从外部世界获得关于他们的反馈。因此,此人(我们可以从现在开始联系他/她我们的*客户机*来实现满足他/她的需求的 web 应用程序。该应用程序的名称为*“为我的猫打分!”*。在与客户的对话中,我们得出了要开发的应用程序的以下功能列表:
我们应用程序的历史从一个假想的人开始,他喜欢猫。此人拥有一个 clowder,他/她希望从外部世界获得关于他们的反馈。因此,此人(我们可以从现在开始联系他/她我们的*客户机*来实现满足他/她的需求的 web 应用程序。该应用程序的名称为“为我的猫打分!”。在与客户的对话中,我们得出了要开发的应用程序的以下功能列表:
为了结束本书,本章的最后一节介绍了一个完整的 web 应用程序(名为*Rate my cat!*)及其相应的 JUnit 5 测试(单元测试、集成测试和端到端测试)。它包括一个 web 应用程序,该应用程序使用本书中介绍的不同技术开发和评估,即 Spring、Mockito、Selenium、Hamcrest、Travis CI、Codecov 和 SonarCloud。*
\ No newline at end of file
为了结束本书,本章的最后一节介绍了一个完整的 web 应用程序(名为`Rate my cat`)及其相应的 JUnit 5 测试(单元测试、集成测试和端到端测试)。它包括一个 web 应用程序,该应用程序使用本书中介绍的不同技术开发和评估,即 Spring、Mockito、Selenium、Hamcrest、Travis CI、Codecov 和 SonarCloud。*