You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running mvn clean test, the following output is generated (excerpt):
[INFO] --- surefire:3.5.3:test (default-test) @ surefire-test ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running custom.ArchUnitTest
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.651 s -- in custom.ArchUnitTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
The assumption would be that the test fails, which is the case with version 3.5.2
[INFO] --- surefire:3.5.2:test (default-test) @ surefire-test ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running custom.ArchUnitTest
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.638 s <<< FAILURE! -- in custom.ArchUnitTest
[ERROR] ArchUnitTest.DTO_IN_PACKAGE_DTO -- Time elapsed: 0.628 s <<< FAILURE!
java.lang.AssertionError:
Architecture Violation [Priority: MEDIUM] - Rule 'classes that have simple name ending with 'DTO' should reside in a package '..dto..'' was violated (1 times):
Class <custom.MyDTO> does not reside in a package '..dto..' in (MyDTO.java:0)
at com.tngtech.archunit.lang.ArchRule$Assertions.assertNoViolation(ArchRule.java:94)
at com.tngtech.archunit.lang.ArchRule$Assertions.check(ArchRule.java:86)
at com.tngtech.archunit.lang.ArchRule$Factory$SimpleArchRule.check(ArchRule.java:165)
at com.tngtech.archunit.lang.syntax.ObjectsShouldInternal.check(ObjectsShouldInternal.java:81)
at com.tngtech.archunit.junit.internal.ArchUnitTestDescriptor$ArchUnitRuleDescriptor.execute(ArchUnitTestDescriptor.java:168)
at com.tngtech.archunit.junit.internal.ArchUnitTestDescriptor$ArchUnitRuleDescriptor.execute(ArchUnitTestDescriptor.java:151)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] Architecture Violation [Priority: MEDIUM] - Rule 'classes that have simple name ending with 'DTO' should reside in a package '..dto..'' was violated (1 times):
Class <custom.MyDTO> does not reside in a package '..dto..' in (MyDTO.java:0)
[INFO]
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
The text was updated successfully, but these errors were encountered:
Affected version
3.5.3
Bug description
ArchUnit tests are not executed correctly with Surefire 3.5.3.
For an underlying DTO class
the following ArchUnit test is defined
The pom.xml looks like this:
When running mvn clean test, the following output is generated (excerpt):
The assumption would be that the test fails, which is the case with version 3.5.2
The text was updated successfully, but these errors were encountered: