<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I get my Maven Integration tests to run in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-do-I-get-my-Maven-Integration-tests-to-run/m-p/83723#M52802</link>
    <description>&lt;P&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html" target="_blank" rel="noopener noreferrer"&gt;Maven build lifecycle&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;now includes the "integration-test" phase for running integration tests, which are run separately from the unit tests run during the "test" phase. It runs after "package", so if you run "mvn verify", "mvn install", or "mvn deploy", integration tests will be run along the way.&lt;/P&gt;&lt;P&gt;By default, integration-test runs test classes named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;**/IT*.java,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;**/*IT.java, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;**/*ITCase.java, but this can be configured.&lt;/P&gt;&lt;P&gt;For details on how to wire this all up, see the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://maven.apache.org/plugins/maven-failsafe-plugin/index.html" target="_blank" rel="noopener noreferrer"&gt;Failsafe plugin&lt;/A&gt;, the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://maven.apache.org/plugins/maven-failsafe-plugin/usage.html" target="_blank" rel="noopener noreferrer"&gt;Failsafe usage page&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(not correctly linked from the previous page as I write this), and also check out&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://www.sonatype.com/people/2009/06/integration-tests-with-maven-part-1-failsafe-plugin/" target="_blank" rel="noopener noreferrer"&gt;this Sonatype blog post&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Aug 2022 11:40:48 GMT</pubDate>
    <dc:creator>JiwanFilembar</dc:creator>
    <dc:date>2022-08-10T11:40:48Z</dc:date>
    <item>
      <title>How do I get my Maven Integration tests to run</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-do-I-get-my-Maven-Integration-tests-to-run/m-p/83299#M52532</link>
      <description>&lt;P&gt;I have a maven2 multi-module project and in each of my child modules I have JUnit tests that are named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Test.java&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Integration.java&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for unit tests and integration tests respectively. When I execute:&lt;/P&gt;&lt;P&gt;mvn test&lt;/P&gt;&lt;P&gt;all of the JUnit tests&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;*Test.java&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;within the child modules are executed. When I execute&lt;/P&gt;&lt;P&gt;mvn test -Dtest=**/*Integration&lt;/P&gt;&lt;P&gt;none of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Integration.java&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;tests get execute within the child modules.&lt;/P&gt;&lt;P&gt;These seem like the exact same command to me but the one with the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;-Dtest=&lt;/STRONG&gt;/*Integration** does not work it displays 0 tests being run at the parent level, which there are not any tests&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 06:36:05 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-do-I-get-my-Maven-Integration-tests-to-run/m-p/83299#M52532</guid>
      <dc:creator>JiwanFilembar</dc:creator>
      <dc:date>2022-07-01T06:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get my Maven Integration tests to run</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-do-I-get-my-Maven-Integration-tests-to-run/m-p/83723#M52802</link>
      <description>&lt;P&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html" target="_blank" rel="noopener noreferrer"&gt;Maven build lifecycle&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;now includes the "integration-test" phase for running integration tests, which are run separately from the unit tests run during the "test" phase. It runs after "package", so if you run "mvn verify", "mvn install", or "mvn deploy", integration tests will be run along the way.&lt;/P&gt;&lt;P&gt;By default, integration-test runs test classes named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;**/IT*.java,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;**/*IT.java, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;**/*ITCase.java, but this can be configured.&lt;/P&gt;&lt;P&gt;For details on how to wire this all up, see the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://maven.apache.org/plugins/maven-failsafe-plugin/index.html" target="_blank" rel="noopener noreferrer"&gt;Failsafe plugin&lt;/A&gt;, the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://maven.apache.org/plugins/maven-failsafe-plugin/usage.html" target="_blank" rel="noopener noreferrer"&gt;Failsafe usage page&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(not correctly linked from the previous page as I write this), and also check out&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://www.sonatype.com/people/2009/06/integration-tests-with-maven-part-1-failsafe-plugin/" target="_blank" rel="noopener noreferrer"&gt;this Sonatype blog post&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 11:40:48 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-do-I-get-my-Maven-Integration-tests-to-run/m-p/83723#M52802</guid>
      <dc:creator>JiwanFilembar</dc:creator>
      <dc:date>2022-08-10T11:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get my Maven Integration tests to run</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-do-I-get-my-Maven-Integration-tests-to-run/m-p/84259#M53110</link>
      <description>&lt;P&gt;You should use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://maven.apache.org/surefire/maven-surefire-plugin/" target="_blank" rel="noopener noreferrer"&gt;maven surefire plugin&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to run unit tests and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://maven.apache.org/surefire/maven-failsafe-plugin/" target="_blank" rel="noopener noreferrer"&gt;maven failsafe plugin&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://voojio.com/chatroom/omegle" target="_blank" rel="noopener"&gt;voojio&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;to run integration tests.&lt;/P&gt;&lt;P&gt;Please follow below if you wish to toggle the execution of these tests using flags.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can follow the&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://maven.apache.org/components/surefire/maven-failsafe-plugin/examples/skipping-tests.html" target="_blank" rel="nofollow noopener noreferrer"&gt;maven documentation&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://omegle.club" target="_blank" rel="noopener"&gt;ome&lt;/A&gt;&lt;A href="https://omegle.ws" target="_blank" rel="noopener"&gt;gle&lt;/A&gt; &lt;A href="https://shagle.download" target="_blank" rel="noopener"&gt;shagle&lt;/A&gt; to run the unit tests with the build and run the integration tests separately.&lt;/SPAN&gt;&lt;/P&gt;&lt;H3&gt;Maven Configuration&lt;/H3&gt;&lt;PRE&gt;        &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;plugin&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;groupId&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;org.apache.maven.plugins&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;groupId&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;artifactId&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;maven-surefire-plugin&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;artifactId&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;configuration&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
                &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;skipTests&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;${skipUnitTests}&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;skipTests&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;configuration&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
        &lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;plugin&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;

        &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;plugin&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;groupId&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;org.apache.maven.plugins&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;groupId&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;artifactId&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;maven-failsafe-plugin&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;artifactId&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;configuration&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
                &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;includes&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
                    &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;include&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;**/*IT.java&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;include&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
                &lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;includes&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
                &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;skipTests&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;${skipIntegrationTests}&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;skipTests&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;configuration&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;executions&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
                &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;execution&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
                    &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;goals&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
                        &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;goal&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;integration-test&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;goal&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
                        &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;goal&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;verify&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;goal&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
                    &lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;goals&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
                &lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;execution&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;executions&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
        &lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;plugin&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;

        &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;properties&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;skipTests&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;false&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;skipTests&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;skipUnitTests&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;${skipTests}&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;skipUnitTests&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;skipIntegrationTests&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;${skipTests}&lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;skipIntegrationTests&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
        &lt;SPAN class=""&gt;&amp;lt;/&lt;SPAN class=""&gt;properties&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;So, tests will be skipped or switched according to below flag rules:&lt;/P&gt;&lt;P&gt;Tests can be skipped by below flags:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;-DskipTests&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;skips both unit and integration tests&lt;/LI&gt;&lt;LI&gt;-DskipUnitTests&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;skips unit tests but executes integration tests&lt;/LI&gt;&lt;LI&gt;-DskipIntegrationTests&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;skips integration tests but executes unit tests&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Running Tests&lt;/H3&gt;&lt;P&gt;Run below to execute&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;only&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Unit Tests&lt;/P&gt;&lt;PRE&gt;mvn clean &lt;SPAN class=""&gt;test&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;You can execute below command to run the tests (both unit and integration)&lt;/P&gt;&lt;PRE&gt;mvn clean verify&lt;/PRE&gt;&lt;P&gt;In order to run&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;only&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Integration Tests, follow&lt;/P&gt;&lt;PRE&gt;mvn failsafe:integration-test&lt;/PRE&gt;&lt;P&gt;Or skip unit tests&lt;/P&gt;&lt;PRE&gt;mvn clean install -DskipUnitTests&lt;/PRE&gt;&lt;P&gt;Also, in order to skip integration tests during&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;mvn install, follow&lt;/P&gt;&lt;PRE&gt;mvn clean install -DskipIntegrationTests&lt;/PRE&gt;&lt;P&gt;You can skip all tests using&lt;/P&gt;&lt;PRE&gt;mvn clean install -DskipTests&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 05:56:15 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-do-I-get-my-Maven-Integration-tests-to-run/m-p/84259#M53110</guid>
      <dc:creator>JiwanFilembar</dc:creator>
      <dc:date>2022-09-23T05:56:15Z</dc:date>
    </item>
  </channel>
</rss>

