Comment by t43562
3 years ago
I think it probably IS the APIs that are a problem but since you usually cannot instantly get rid of such things I think you need tricks.
e.g. keeping your fixtures in separate files and naming them in such a way that the actual data doesn't appear in your test code.
You might use some fixture as a base value (in my case I had this problem with a big old structure that describes PKI certificates of may types) and have derived fixtures that are (the base plus a change to the "account" field or the base with the "accept" field set to "false"). I did this with python classes and inheritance. Each derived class copied the base class's data and applied a diff. YMMV but I mention it just in case it helps.
If these are all named and kept in separate files then your actual integration tests can look a bit simpler perhaps?
No comments yet
Contribute on Hacker News ↗