Ask Your Question
2

Why doesn't Gradle transfer test resources that are specific to a package?

asked 2023-05-12 22:34:09 +0000

lakamha gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-05-12 23:00:02 +0000

lalupa gravatar image

Gradle doesn't transfer test resources that are specific to a package because it assumes that all test resources are common to all tests in the project. Therefore, if there are test resources specific to a package, they should be placed in the common test resources directory.

This is because Gradle uses a convention-based approach for locating and managing the test resources. By default, all test resources are expected to reside in the src/test/resources directory. If tests need to use resources that are specific to a package, they should be organized in subdirectories under src/test/resources.

By following this convention, Gradle makes it easier and more efficient to manage test resources and ensures that they are available to all tests in the project.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-12 22:34:09 +0000

Seen: 15 times

Last updated: May 12 '23