Skip to Content
Java持续交付
book

Java持续交付

by Daniel Bryant, Abraham Marín-Pérez
November 2019
Beginner to intermediate
406 pages
9h 21m
Chinese
Publishing House of Electronics Industry
Content preview from Java持续交付
284
11
功能性测试:正确和接受度
如果被测试服务表示结果受到通信故障的影响,那么你可以简单地跳过断言。但是,重
要的是告诉测试框架这个情况,并将该测试标记为“跳过”或者“忽略”,因为如果将
其标记为“成功”或者“失败”会误导开发人员。当开发人员知道某个测试没有运行时,
他们可以决定如何处理,是重复测试,还是接受测试会增加测试总体时间的风险。
如果你什么都做不了
在一些罕见的情况下,由于各种原因,你可能无法解决测试的问题。或许你依赖一个其
他团队甚至组织管理的系统或者组件,又或许被测试系统本身就是不确定的,你如果不
重新实现测试中的业务逻辑,就无法适应意外的事件。无论什么原因,当你无法修复问
题时,就应该考虑如何缓解它。
如果问题可以修复,只是当前还无法做到,而且已经有人在着手解决,那么你可以考虑
暂时忽略这个测试。你可以简单地将它标记为已忽略,然后记得在将来的某个时刻重新
启用它(可以使用团队共享日历中的提醒功能)。或者如果你想要更加自动化,可以将
其配置为仅从某个特定时间开始运行,这样你就可以现在暂时忽略它,然后在将来的某
个时刻自动启用它。
如果你或者其他人都无法修复问题,可以尝试缩小测试的范围。也许你在验收测试上试
图实现的目标,可以通过一些组件测试和集成测试来完成,这样可能也会更加可靠。此外,
这样还可以加快测试的速度(这也是很多团队最终需要长达一小时才能完成一次构建的
原因)。
最后,如果你确定无法修复问题,那么必须考虑删除这个测试。这似乎是一个极端的举
措,但是你要记住,测试是为了提供有价值的信息,从而形成快速的反馈循环。如果它 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

写给系统管理员的Python脚本编程指南

写给系统管理员的Python脚本编程指南

Posts & Telecom Press, Ganesh Sanjiv Naik
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
解密金融数据

解密金融数据

Justin Pauley
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787121374425