Может ли TestNg интриговать интеграционные тесты, а junit5 — юнит-тесты в одном и том же pom? ⇐ JAVA
Может ли TestNg интриговать интеграционные тесты, а junit5 — юнит-тесты в одном и том же pom?
So I have a pom file, where I got junit5, and I got testng, and i'd like to achieve the following: When running mvn verify -> first the unit tests would run using junit platform and then integration tests would run but testng would be the platform provider for integration tests ( I do have xml files).
And when running mvn package -> I want the surefire plugin to run only the junit platform and run the unit tests.
At the moment, I do see that when running mvn package it runs the unit tests using junit platform provider, which is good.
Also when running mvn verify it first runs the unit tests using the junit platform provider and run the unit tests which is great, but then it doesn't find the testng platform provider and it doesn't run any integration tests written inside the xml file.
Pom:
5.8.2 1.17.2 1.8.2 org.junit.jupiter junit-jupiter ${junit.jupiter.version} org.testcontainers testcontainers ${testcontainers.version} org.testcontainers junit-jupiter ${testcontainers.version} org.junit.platform junit-platform-suite-api ${junit.platform.version} org.junit.platform junit-platform-suite-engine ${junit.platform.version} org.junit.vintage junit-vintage-engine ${junit.jupiter.version} org.junit.jupiter junit-jupiter-api ${junit.jupiter.version} org.testng testng 7.9.0 test org.junit.support testng-engine 1.0.1 test org.apache.maven.plugins maven-surefire-plugin 2.22.2 org.apache.maven.surefire surefire-junit-platform 3.2.1 org.apache.maven.surefire surefire-testng 3.2.1 org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M7 integration-test verify src/test/resources/testng-first- suite.xml src/test/resources/testng-second- suite.xml
Источник: https://stackoverflow.com/questions/780 ... t-the-same
So I have a pom file, where I got junit5, and I got testng, and i'd like to achieve the following: When running mvn verify -> first the unit tests would run using junit platform and then integration tests would run but testng would be the platform provider for integration tests ( I do have xml files).
And when running mvn package -> I want the surefire plugin to run only the junit platform and run the unit tests.
At the moment, I do see that when running mvn package it runs the unit tests using junit platform provider, which is good.
Also when running mvn verify it first runs the unit tests using the junit platform provider and run the unit tests which is great, but then it doesn't find the testng platform provider and it doesn't run any integration tests written inside the xml file.
Pom:
5.8.2 1.17.2 1.8.2 org.junit.jupiter junit-jupiter ${junit.jupiter.version} org.testcontainers testcontainers ${testcontainers.version} org.testcontainers junit-jupiter ${testcontainers.version} org.junit.platform junit-platform-suite-api ${junit.platform.version} org.junit.platform junit-platform-suite-engine ${junit.platform.version} org.junit.vintage junit-vintage-engine ${junit.jupiter.version} org.junit.jupiter junit-jupiter-api ${junit.jupiter.version} org.testng testng 7.9.0 test org.junit.support testng-engine 1.0.1 test org.apache.maven.plugins maven-surefire-plugin 2.22.2 org.apache.maven.surefire surefire-junit-platform 3.2.1 org.apache.maven.surefire surefire-testng 3.2.1 org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M7 integration-test verify src/test/resources/testng-first- suite.xml src/test/resources/testng-second- suite.xml
Источник: https://stackoverflow.com/questions/780 ... t-the-same
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение