Hello,

I've started writing tests in the druid repo and would like to propose a
new test naming structure for the project. Inspired by this thread -
https://www.mail-archive.com/dev@druid.apache.org/msg02426.html but focused
only on the naming of tests. I'd like to propose we start using the format
below

test_<functionUnderTest>_<conditions>_<expectedResult>

This makes it a lot easier for devs to name tests in a way that's easily
understood by someone else without having to read the test to know what's
going on. Here's some of my rationale:

   - Explicit - the name tells you everything you need to know about the
   test
   - Forces you to write one test per condition/ expected result
   - Underscores make it easy to delineate the different components of the
   test
   - Minimal effort to think of a short name that correctly captures
   everything about the test while still being different from all the other
   tests

Happy to hear feedback / concerns about this approach.

Suneet

Reply via email to