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

  • SEARCH
  • Home
  • 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 8556769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:25:46+00:00 2026-06-11T15:25:46+00:00

We are trying to run integration tests of Spring based code on an embedded

  • 0

We are trying to run integration tests of Spring based code on an embedded tomcat container using TestNG framework.

We have tried to use the existing Arquillian Spring Extension without much success. Maybe some missing configuration. We have followed instructions from this post

Our pom includes the following dependencies:

        <dependency>
        <groupId>org.jboss.arquillian</groupId>
        <artifactId>arquillian-bom</artifactId>
        <version>1.0.2.Final</version>
        <scope>test</scope>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>org.jboss.arquillian.testng</groupId>
        <artifactId>arquillian-testng-container</artifactId>
        <version>1.0.2.Final</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.8</version>
        <scope>test</scope>
    </dependency>
    <!-- Spring Extension -->
    <dependency>
        <groupId>org.jboss.arquillian.extension</groupId>
        <artifactId>arquillian-service-container-spring</artifactId>
        <version>1.0.0.Beta1</version>
        <scope>test</scope>
    </dependency>
    <!-- testing END -->

We have also added a Tomcat embedded profile to our pom.

        <profile>
        <id>arquillian-tomcat-embedded-7</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <dependencies>
            <dependency>
                <groupId>org.jboss.arquillian.container</groupId>
                <artifactId>arquillian-tomcat-embedded-7</artifactId>
                <version>1.0.0.CR3</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.tomcat.embed</groupId>
                <artifactId>tomcat-embed-core</artifactId>
                <version>7.0.30</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.tomcat.embed</groupId>
                <artifactId>tomcat-embed-jasper</artifactId>
                <version>7.0.30</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.tomcat</groupId>
                <artifactId>tomcat-juli</artifactId>
                <version>7.0.30</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jdt.core.compiler</groupId>
                <artifactId>ecj</artifactId>
                <version>3.7</version>
                <scope>test</scope>
            </dependency>

            <!-- Weld servlet for testing CDI injections -->
            <dependency>
                <groupId>org.jboss.weld.servlet</groupId>
                <artifactId>weld-servlet</artifactId>
                <version>1.1.9.Final</version>
            </dependency>
        </dependencies>
    </profile>

Our arquillian.xml looks like…

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jboss.org/schema/arquillian"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

<container qualifier="tomcat" default="true">
    <configuration>
        <property name="unpackArchive">true</property>
    </configuration>
</container>

We also tried adding the following lines to our arquillian.xml

<extension qualifier="spring">
    <property name="autoPackage">true</property>
    <property name="springVersion">3.0.0.RELEASE</property>
    <property name="cglibVersion">2.2</property>

    <property name="includeSnowdrop">true</property>
    <property name="snowdropVersion">2.0.3.Final</property>

    <property name="customContextClass">org.jboss.spring.vfs.context.VFSClassPathXmlApplicationContext</property>
</extension>

We have created an empty test and check that the embedded Tomcat starts and the test is run.
The next step is to verify that the Arquillian Spring Extension is working properly, and to do so we are trying to inject a Spring bean into our test.

The problem is that the @SpringConfiguration annotation isn’t available at all. So we guess we are missing some configuration. Any clues on how to proceed?

  • 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-06-11T15:25:47+00:00Added an answer on June 11, 2026 at 3:25 pm

    You’re using the arquillian-service-container-spring artifact which is the Embedded Spring container. To use if with another Container you need to use the arquillian-service-deployer-spring-3 and arquillian-service-integration-spring-inject artifacts.

    service-deployer adds auto adding Spring dependencies to the deployment while service-integration-spring-inject adds the @Inject/@Autowire support in the test case.

    See https://github.com/arquillian/arquillian-showcase/blob/master/spring/spring-inject/pom.xml#L43

    Multiple other examples can be found here:
    https://github.com/arquillian/arquillian-showcase/tree/master/spring

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

Sidebar

Related Questions

I have a Spring/Hibernate webapp that has some integration tests that run on an
I'm trying to integration test my application with Spring TestContext framework. I have done
When trying to run an Eclipse Dynamic Web Project under a Tomcat setup using
I'm trying to create integration tests using hsqldb in an in memory mode. At
I have am trying to create some integration tests with no external database dependencies
I am trying to run integration tests against a REST web service process that
So, I'm confused by this failure. I'm using MSTest to run some integration tests
I am trying to run a series of HTML selenium tests using the selenese
I'm trying to use Maven Failsafe Plugin to run my functional/integration tests, according to
I am trying to get SpecUnit to run in a continuous integration build using

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.