1

I am working on a large project and need to offer users the ability to optionally enable or disable local integration test cases ( For pipeline, test cases must be enforced).

D M
  • 33
  • 3
  • Could you tell us more about the project? (ex. pipeline, testcase library etc..) – minchaej Jun 29 '21 at 05:07
  • 1
    There is a concept of [Profiles](https://www.baeldung.com/spring-profiles) in Spring. Also see https://stackoverflow.com/questions/44256956/run-gradle-task-with-spring-profiles-integration-tests – Михаил Нафталь Jun 29 '21 at 07:29

1 Answers1

2

First of all, welcome to the community.

Next, you can modify the test task inside the build.gradle file or maybe add a new task called integrationTest and implement your custom logic there.

As an instance, you can check this gist on Github: Separating tests from integration tests with Gradle

You can also use @Profile annotation to your integration test classes and run your tests with different profiles. You can read more about profiles using the following link: Spring Profiles

Reza Ebrahimpour
  • 814
  • 6
  • 20