TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How often are you frustrated with flaky tests?

3 点作者 ublaze将近 6 年前
Are you looking for better tooling to debug&#x2F;catch&#x2F;auto retry flaky tests? What kind of tooling do you already have, and what alternatives have you looked for?<p>Is there some tool&#x2F;service you wish existed?

4 条评论

quickthrower2将近 6 年前
I&#x27;ve worked somewhere before where there have been flakey tests and they had a system to detect them and list them, and they could be assigned to people. Pretty nice.<p>I&#x27;d like it to exist as a service yes, if it can plug into any testing output, and accurately know that yes something is a flakey test. The telltale sign is a retry on the same branch fails then passes with no source code changes.<p>I am not sure however if any company I worked for would PAY for such a system. That&#x27;s a different question. But as a developer I&#x27;d like to use one if it is well honed.
photonios将近 6 年前
Just fix them? Where I work we explicitly do not automatically retry failing tests. Otherwise the incentive goes away to fix them. At some point somebody will be frustrated enough to fix the issue.<p>Note: we have run hundreds of little browser-based tests, visual snapshots and thousands of unit and integration tests on each PR. Flaky tests get annoying real quick and get fixed quickly as a result.
ComputerGuru将近 6 年前
Write tests to be deterministic from the very start (mainly: learn to use synchronization primitives to synchronize events rather than trying on timing coincidences) and then you&#x27;ll realize there&#x27;s no such thing as a flaky test.
评论 #20074753 未加载
cpufry将近 6 年前
not to be too dramatic, but they are bane of my existence