I was used to naming my JUnit Integration tests with a *Test.java
on the end eg DatabaseConnectionTest.java
and placing them in their own integration test directory: eg test/integration/com...
On joining a new project I was directed
No, all the Tests go in the one directory, and we distinguish the Unit Tests from the Integration tests by pattern matching on the file name suffix.
So my file above would become DatabaseConnectionIT.java
Now I can see the logic in this. The test runner script can just pattern match for the files it is looking for, and all the tests are in the one location.
But I had never heard of the convention.
My question is: Is the 'IT.java'
filename Suffix (instead of 'Test.java'
) for JUnit Integration Tests a convention?