Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): Introduce junit5 vintage engine for running junit4 test cases over junit5 in rosco #958

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

j-sandy
Copy link
Contributor

@j-sandy j-sandy commented Mar 2, 2023

Spring boot 2.4.x removed JUnit5 vintage engine from spring-boot-starter-test. It is required for executing junit4 based test cases in rosco. So, introducing junit-vintage-engine dependency in build.gradle, using testRuntimeOnly() as suggested in section 3.1 of https://junit.org/junit5/docs/5.6.2/user-guide/index.pdf

After applying this fix, coverage increased from 217 to 252 test case executions.

…ases over junit5 in rosco

Spring boot 2.4.x removed JUnit5 vintage engine from spring-boot-starter-test.
[https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.4-Release-Notes#junit-5s-vintage-engine-removed-from-spring-boot-starter-test]
It is required for executing junit4 based test cases in rosco.
So, introducing junit-vintage-engine dependency in build.gradle, using testRuntimeOnly() as suggested in section 3.1 of https://junit.org/junit5/docs/5.6.2/user-guide/index.pdf

After applying this fix, coverage increased from 217 to 252 test case executions.
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for merge label Mar 2, 2023
@mergify mergify bot added the auto merged label Mar 2, 2023
@mergify mergify bot merged commit 368f8e5 into spinnaker:master Mar 2, 2023
@j-sandy j-sandy deleted the junit5-vintage-engine branch March 3, 2023 06:57
dbyron-sf added a commit to dbyron-sf/rosco that referenced this pull request Mar 21, 2023
…intage-engine dependency

as it's not needed at test compile time, and since build.gradle supplies a test runtime dependency as of spinnaker#958
mergify bot pushed a commit that referenced this pull request Mar 22, 2023
…test runtime dependency (#963)

* chore(manifests): remove testImplementation org.junit.vintage:junit-vintage-engine dependency

as it's not needed at test compile time, and since build.gradle supplies a test runtime dependency as of #958

* fix(manifests/test): add org.junit.jupiter:junit-jupiter-engine as a test runtime dependency

so junit5 tests run.  Before this PR, 9 tests ran in rosco-manifests, all spock tests.
After this PR, 32 tests run.

Note that spring-boot-starter-test brings in org.junit.jupiter:junit-jupiter-engine so
where that's used, we don't need to declare junit-jupiter-engine explicitly.  Note also
that rosco-core currently only has spock tests, so although it doesn't use
spring-boot-starter-test, it doesn't need org.junit.jupiter:junit-jupiter-engine either.
yugaa22 pushed a commit to OpsMx/rosco-oes that referenced this pull request Jun 26, 2023
…ases over junit5 in rosco (spinnaker#958)

Spring boot 2.4.x removed JUnit5 vintage engine from spring-boot-starter-test.
[https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.4-Release-Notes#junit-5s-vintage-engine-removed-from-spring-boot-starter-test]
It is required for executing junit4 based test cases in rosco.
So, introducing junit-vintage-engine dependency in build.gradle, using testRuntimeOnly() as suggested in section 3.1 of https://junit.org/junit5/docs/5.6.2/user-guide/index.pdf

After applying this fix, coverage increased from 217 to 252 test case executions.
yugaa22 pushed a commit to OpsMx/rosco-oes that referenced this pull request Jun 26, 2023
…test runtime dependency (spinnaker#963)

* chore(manifests): remove testImplementation org.junit.vintage:junit-vintage-engine dependency

as it's not needed at test compile time, and since build.gradle supplies a test runtime dependency as of spinnaker#958

* fix(manifests/test): add org.junit.jupiter:junit-jupiter-engine as a test runtime dependency

so junit5 tests run.  Before this PR, 9 tests ran in rosco-manifests, all spock tests.
After this PR, 32 tests run.

Note that spring-boot-starter-test brings in org.junit.jupiter:junit-jupiter-engine so
where that's used, we don't need to declare junit-jupiter-engine explicitly.  Note also
that rosco-core currently only has spock tests, so although it doesn't use
spring-boot-starter-test, it doesn't need org.junit.jupiter:junit-jupiter-engine either.
nemesisOsorio pushed a commit to OpsMx/rosco-oes that referenced this pull request Apr 27, 2024
…ases over junit5 in rosco (spinnaker#958)

Spring boot 2.4.x removed JUnit5 vintage engine from spring-boot-starter-test.
[https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.4-Release-Notes#junit-5s-vintage-engine-removed-from-spring-boot-starter-test]
It is required for executing junit4 based test cases in rosco.
So, introducing junit-vintage-engine dependency in build.gradle, using testRuntimeOnly() as suggested in section 3.1 of https://junit.org/junit5/docs/5.6.2/user-guide/index.pdf

After applying this fix, coverage increased from 217 to 252 test case executions.
nemesisOsorio pushed a commit to OpsMx/rosco-oes that referenced this pull request Apr 27, 2024
…test runtime dependency (spinnaker#963)

* chore(manifests): remove testImplementation org.junit.vintage:junit-vintage-engine dependency

as it's not needed at test compile time, and since build.gradle supplies a test runtime dependency as of spinnaker#958

* fix(manifests/test): add org.junit.jupiter:junit-jupiter-engine as a test runtime dependency

so junit5 tests run.  Before this PR, 9 tests ran in rosco-manifests, all spock tests.
After this PR, 32 tests run.

Note that spring-boot-starter-test brings in org.junit.jupiter:junit-jupiter-engine so
where that's used, we don't need to declare junit-jupiter-engine explicitly.  Note also
that rosco-core currently only has spock tests, so although it doesn't use
spring-boot-starter-test, it doesn't need org.junit.jupiter:junit-jupiter-engine either.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants