|
ChickenWing posted:Oh my god. I felt super smart when I figured out you can do tests for configurations. For example we have a bunch of "permissions" defined with Enums. And you also need to define in an xml for which permissions are granted for different user states. So when you add a new permission you need to change stuff in two places. So I made a test that checks that all the Enums are defined somewhere in the xml. So if someone forgets to add it to the xml the test goes "This permission exists but is never used anywhere". Works really well when one thing has to be added to multiple places. These are my new favorite kind of tests. If you can't make something unforgettable, make a test that fails when you forget the thing. Your teammates will also thank you when your configuration test saves them time on debugging!
|
# ¿ Jan 26, 2016 19:35 |
|
|
# ¿ May 3, 2024 07:12 |