24-Integration Tests - Maven Failsafe Plugin Configuration | Maven for Beginners | Code Journal

Maven for Beginners series is for all those people who want to learn Maven and use it in the most efficient way.
While Unit Tests provide a huge confidence in the code that you write, the importance of having Integration Tests is still unquestionable. Integration tests allow you to test the components when they interact with each other. Maven Failsafe plugin is designed to run integration tests. In our video today, we will see how to run this plugin and see some common configurations that you might use in your projects.
Here is the Article for the Video - www.thecodejournal.tech/2022/...
#Maven #Tutorial #DevOps #Learning #CodeJournal #MavenForBeginners #DependencyManagement #MavenLifecycle #JUnit #JUnit4 #Junit5 #Surefire #Testing #TestNG #Failsafe

Пікірлер: 5

  • @carldea
    @carldea6 ай бұрын

    Thanks for the video. Could you create a similar video but with JPMS (Java module path) with Java 21 (LTS)?

  • @nilanjansarkar100
    @nilanjansarkar100 Жыл бұрын

    Outstanding video

  • @vekildh
    @vekildh Жыл бұрын

    Thank you. I have similar config in my pom.xml but when I execute tests as below, my Unit tests are also getting executed. How do I skip running unit tests? Any quick advise would be much appreciated $ mvn clean verify -DskipTest -Denv=qa or $ mvn integration-test -Denv=qa sample pom snippet: org.apache.maven.plugins maven-surefire-plugin 3.0.0-M7 **/*IT test org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M7 integration-test verify

  • @CodeJournal

    @CodeJournal

    Жыл бұрын

    I have another video that talks about Surefire configurations which has a section for skipping tests - kzread.info/dash/bejne/eXWZxMeEeMbJZ5s.html

  • @vekildh

    @vekildh

    Жыл бұрын

    ​@@CodeJournal Finally figured out a way to run only IT or Unit tests: 1. To run only Integration Tests and no Unit tests: $ mvn failsafe:integration-test -Denv=qa 2. To run only Unit tests and no Integration Tests: $ mvn surefire:test -Denv=dev Only, thing is I have to provide an env. Need to check how the default env/profile should work now

Келесі