I recently posted a large chunk of code. It feels like a tall order to code review.

I've written a bunch of tests to test my code. Would those tests be useful to the reviewer?

I'm not looking for a code review of my tests, but rather looking to minimize the burden of the code reviewer.

In essence, I'm asking: When you code review, do you actually run the code? If so, would you like a set of test cases so you can run my code?

  • 7
    \$\begingroup\$ Tests are always a plus, you always get a +1 if I see them. They mean we can be more daring with our changes, and there's tests to check for our one off errors and such. \$\endgroup\$
    – Peilonrayz Mod
    Nov 6, 2017 at 15:35
  • 5
    \$\begingroup\$ Fully agree with @Peilonrayz here. They are not required, but if you have them and are willing to include them, that's beneficial to the reviewer (and thus for you, since it usually leads to better reviews). \$\endgroup\$
    – Mast Mod
    Nov 6, 2017 at 15:38

1 Answer 1


Yes, if you have automated tests, please include them.

Some folks will take the posted code and paste it into a dev environment/IDE and make changes there (so they can ensure that their answer has the correct syntax). If you include your test code, reviewers can be bolder in their changes with less concern that they have broken something.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .