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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How do you handle an unwieldy test suite?

1 点作者 aceshades超过 7 年前
IIRC, if one were to follow TDD principles appropriately, it requires you to run tests and run tests often while you work on a change to the codebase. My problem is that I joined a team that has pretty spotty test suite that can run extremely slow at times (it&#x27;s a Python project that uses pytest). It could take 30-40 minutes for just a single run of the suite.<p>What ends up happening is that team members (myself included), unfortunately put tests on a backburner only up until it&#x27;s time to submit a pull request to master, and at that time it reveals that their changes are breaking tests all over the place. Fixing them all could take a whole day&#x27;s worth of work just to get everything in line.<p>I have to assume there&#x27;s got to be a better way of going about this. We are all trying to improve the test suite as we go along, but &quot;improve&quot; seems to kind of a moving target as no one on the team really has strong knowledge of how to write a test suite that is fast and comprehensive and maintainable. Personally, I&#x27;ve been scouring the internet for resources that can touch on this at a deep level, but I&#x27;ve come up short.<p>Does anyone have any tips for handling this?

1 comment

itamarst超过 7 年前
What is the test suite spending its time on? CPU? Waiting for a database? `time.sleep()`?