1

Working on Java projects, it is widely accepted that you should use a standard project layout. That is the standard template you find on many open source projects, i.e.

  • src/main/java
  • src/main/sass
  • src/main/test
  • src/main/resources
  • src/anotherModule/kotlin

Now, it is assumed that all tests fall under src/main/test. I have seen this everywhere.

Now suppose you want to separate unit from integration tests so that they will not run together in CI. Is there any widely accepted convention about project layouts for integration and/or automated E2E tests?

In general, is it correct to state that I should plan to store tests so that all those under the same folder will run in the same test execution? That means if I have multiple suites, each should have its own root folder. And again, is there any known and accepted convention that integrates with popular build tools and makes testing experience seamless?

I couldn't quickly identify any in most popular open source frameworks.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
usr-local-ΕΨΗΕΛΩΝ
  • 26,101
  • 30
  • 154
  • 305
  • 2
    The standard package layout is `src/test/`, not `src/main/test`: http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html. That suggests `src/it` for integration tests. – jonrsharpe Jul 05 '19 at 12:23

0 Answers0