girder / girder_web_components

Reusable Javascript and VueJS components for interacting with a Girder server.
https://gwc.girder.org
Apache License 2.0
16 stars 9 forks source link

Testing practices and coverage #54

Open subdavis opened 5 years ago

subdavis commented 5 years ago

What are we shooting for w.r.t. code coverage? Right now my goal has been to just write a few tests to exercise the code, but I haven't been too thorough.

Should this repository have requirements for overall coverage, branch coverage, etc? Should we enforce that with CI, or make it an official part of the contribution guidelines?

Should we write some contribution guidelines?

zachmullen commented 5 years ago

I'd be happy to put a threshold in place like we have in Girder, with the following philosophical caveats about coverage as a metric:

  1. Coverage is like a Bloom filter, it can tell you what definitely isn't tested, but cannot tell you what is appropriately tested.
  2. Coverage metrics treat every line of code with the same importance.

So while I think it's a good idea to put a threshold in place to make sure we aren't doing anything too bad, we can't treat that number as an indication that we are doing anything particularly well with regards to our testing.

I have no opinion on what that number should be, to start with I think it's fine to just make it slightly below whatever it is now.