4 ms·
thomaslord and WJW did a great job saying what I would have said. Django already provides you the harness, and when you try to implement it yourself you will ru
by hugodutka 6y ago
thomaslord and WJW did a great job saying what I would have said. Django already provides you the harness, and when you try to implement it yourself you will run into some gnarly technical problems. How do you make sure one test's database changes are not seen by a different test? Are you going to run tests sequentially and reset the DB before every single one? Or are you going to try to wrap your requests in a transaction that can be rolled back afterwards? Any approach you take, you are reinventing what Django already does.
- charrondev 6y agoAs someone that’s maintained an E2E test harness in PHP including internal dispatching, having multiple DBs active in a test suite, having multiple active sites running and communicating with each other, handling integration tests to Elastic, Sphinx, and Memcached, I really don’t think it’s such a big deal to spend a day or 2 plumbing out your test harness for a “big” app. A big app takes years of work, and along the way you be building utility functions to easily stand up test data. It’s not that hard and you don’t need it all at once.
- hugodutka 6y agoThat's an interesting take. My experience has been mainly with small to medium sized applications, and I just have not wanted to expend the resources to maintain a custom test harness.