From 2198f6862aca414fa611429a66fe0563a4638d87 Mon Sep 17 00:00:00 2001 From: michaelabuckley Date: Wed, 24 Aug 2022 11:20:28 -0400 Subject: [PATCH] Test naming --- Contributing.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Contributing.md b/Contributing.md index 57045ca..0317099 100644 --- a/Contributing.md +++ b/Contributing.md @@ -13,4 +13,11 @@ Variable naming: * Statics are named `ourFoo` * Constants are named `FOO_CONSTANT` -The project also uses an [`.editorconfig`](https://editorconfig.org/) file to avoid ever worrying about tabs vs. spaces issues. There are plugins for most IDEs (and IntelliJ has built in support) for this format, so it is highly recommended to use it. \ No newline at end of file +The project also uses an [`.editorconfig`](https://editorconfig.org/) file to avoid ever worrying about tabs vs. spaces issues. There are plugins for most IDEs (and IntelliJ has built in support) for this format, so it is highly recommended to use it. + +Test naming: + +* Test classes end with `Test` (e.g. SubscriptionCanonicalizerTest) or `IT` (e.g. Batch2CoordinatorIT) +* Test classes named `*Test` should be safe to run in parallel. +* Any test that depends on external resources (e.g. Docker containers) or is otherwise unsafe to run in parallel should be named `*IT`. These will be run as integration tests, one at a time, in isolated jvms. +* We are experimenting with a naming scheme for microtests (quick, narrow, unit-tests): test methods are named by template `methodName_StateUnderTest_ExpectedBehavior`. See the first convention in this [list](https://dzone.com/articles/7-popular-unit-test-naming).