Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7607369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:38:43+00:00 2026-05-31T00:38:43+00:00

I have read here about unit testing with the Surefire plugin and integration testing

  • 0

I have read here about unit testing with the Surefire plugin and integration testing with the Failsafe plugin, but I am still unclear about how the POMs should look in a Maven project that consists of a parent and multiple child modules, each with their own POM file.

Questions:

  • Has anyone implemented integration tests and unit tests in each of their modules?
  • If so, would you be so kind as to show your POMs so I have an example of a good working configuration?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T00:38:44+00:00Added an answer on May 31, 2026 at 12:38 am

    See my answer to question: How can I switch between two test suites in Maven 2?
    I prefer maven module – very easy to implement and you do not need knowledge about other plugin.

    If you using testng you can just define in your parent pom (one place only):

    <profile>
        <id>normal</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <excludedGroups>integration</excludedGroups>
                    </configuration>
                </plugin>
            </plugins>
        </build>
        </profile>
    <profile>
        <id>integration</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <includedGroups>integration</includedGroups>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>
    

    Annotate all integration tests by:

    @Test(groups="integration")
    

    If you use junit see Category

    You run normal test by: mvn clean install integration tests by mvn -Pintegration clean install

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read many posts about setting up unit testing in Zend Framework and
I have read the post here about using setTimeout() during intensive DOM processing (using
I have read some posts on here about not mixing parameters when passing into
I have read quite a few selcet+update questions in here but cannot understand how
I just recently read about Mocking objects for unit testing and currently I'm having
I have found many questions here about storing values in viewstate, but haven't found
I've read a few threads on SO about usefulness of unit-testing various applications. The
I have read about POCO (Plain old CLR (or C#) object) here ,and confused
I have read about here documents on the book The Ruby Programming Language and
I have read plenty of articles (particularly on here) about Parameter Sniffing in Stored

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.