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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How do you handle test data and retroactively testing with Django?

6 点作者 tallerholler将近 10 年前
Currently I am part of a startup with a large django-rest-framework based api and an issue that has been glaring is that the way we&#x27;ve handled test data is not working anymore...<p>When I joined the project there existed a huge testdata script that essentially did a ton of manual model creation etc into set of data that is used in conjunction with fixtures for testing. The status quo since then has been to wipe the database and run migrate&#x2F;testdata script.<p>At some point we moved too far ahead and the testdata broke but because of the business leadership we didn&#x27;t have time to stop and fix it.<p>Now it&#x27;s at a point where we have live customers and we are running into a bunch of problems when we migrate various live servers and the data from users breaks something we hadn&#x27;t discovered because we both don&#x27;t have proper testdata AND our test coverage is 0%.<p>I would like to gather feedback on strategies to avoid total disaster and implement better development strategy going forward, as well as any advice on retroactively implementing a testing framework.<p>At some point does it even make sense to have a testdata type script or should we just be going off database snapshots that we discard&#x2F;restore?<p>Any info appreciated!

暂无评论

暂无评论