Results 1 to 4 of 4

Thread: TestContext Framework

  1. #1

    Default TestContext Framework

    Hi ,
    1)What dependency (at the pom.xml) I have to refer in order to user the CustomContextLoader as the loader of the @ContextConfiguration ?
    2)What dependency (at the pom.xml) I have to refer in order to user the @RunWith annotation ?

    Regards.

  2. #2
    Join Date
    Apr 2007
    Posts
    307

    Default

    Which ContextLoader are you wanting to use? Note that if you're using Spring 3.0, there is not (yet) a ContextLoader implementation dedicated to processing @Configuration classes. Follow SPR-6184 to be notified when this changes.

    To use the @RunWith annotation you need JUnit in your pom as shown here: http://mvnrepository.com/artifact/junit/junit/4.8.1
    Chris Beams
    Spring Framework committer, VMware
    http://github.com/cbeams

  3. #3

    Default @ContextConfiguration loader

    Hi Chris ,

    First thank you for your quick response ,I'm using Spring 3.0.1, I raised this question since I am using a class annotated with @Configuration and I wanted to load the context from this class .
    I wanted to believe :-) ,that since Spring 2.5.6 supported loading the Java context configuration by the JavaConfigContextLoader like here :
    Code:
    @ContextConfiguration(locations = {
            "com.tradefxl.integrationserver.test.TestsSpringConfiguration",
            "com.tradefxl.integrationserver.test" }, loader = JavaConfigContextLoader.class)
    I will be able to load my Java context configuration class (Since I am using a newer version/release of Spring and I assumed it will have a similar but better features , my mistake...)

    Thanks again.
    Regards.

  4. #4

    Default Spring for test framework

    Hi Chris,
    At the previous version (2.5.6) we used a the Java config framework to configure Spring . we used Spring for test framework as well based on the JavaConfigContextLoader.
    Is there any alternative in Spring 3.0.1 ? (I understood from your previous message that there isn't ), If there is not , when it will be available ?

    Thanks again.
    Regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •