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

Поділитися
Вставка
  • Опубліковано 13 гру 2024

КОМЕНТАРІ • 5

  • @nilanjansarkar100
    @nilanjansarkar100 Рік тому

    Outstanding video

  • @carldea
    @carldea 11 місяців тому

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

  • @vekildh
    @vekildh 2 роки тому +1

    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  2 роки тому +1

      I have another video that talks about Surefire configurations which has a section for skipping tests - ua-cam.com/video/GAebeKHcc78/v-deo.html

    • @vekildh
      @vekildh 2 роки тому +1

      ​@@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