dimanche 8 septembre 2019

How to force Visual Studio Code to use testing application.properties?

I have typical project structure

+---MyService
|   |   build.gradle
|   \---src
|       +---main
|       |   +---java
|       |   |   +---application
|       |   |   |   |   Application.java
|       |   |   |   |
|       |   |   |   \---item
|       |   |   |           Source1.java
|       |   |   |           Source2.java
|       |   |   |           Source4.java
|       |   |   |           Source5.java
|       |   |   |
|       |   |   \---tests
|       |   \---resources
|       |           application.properties
|       |
|       \---test
|           +---java
|           |   \---application
|           |           FirstTest.java
|           |           SecondTest.java
|           |           ThirdTest.java
|           |
|           \---resources
|                   application.properties

When I run tests with gradle, it uses appropriate file src/test/resources/application.properties, but when I run tests via VSC test explorer, it uses src/main/resources/application.properties.

How can I change VCS to use properties from test folder?

Aucun commentaire:

Enregistrer un commentaire