TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

6 pointsby tallerholleralmost 10 years ago
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!

no comments

no comments