cancel
Showing results for 
Search instead for 
Did you mean: 

Spring Test Dependency

fsanna
Champ in-the-making
Champ in-the-making

Hi guys, I need help adding dependencies into an Alfresco Platform Archetype Project. I need to test a couple of classes but to do that I need to the spring-test dependency, which is not included in the main community version of Alfresco. I would like to add this to the pom.xml file:

<dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>5.3.9</version>
            <scope>test</scope>
</dependency>

But if I do so, whenever I make the test run, it gives me this message and the test won't run:

java.lang.illegalstateexception: could not load testcontextbootstrapper [null]. specify @bootstrapwith's 'value' attribute or make the default bootstrapper class available.

Is there any way to add this dependency without getting the error message? Am I doing something wrong?

1 REPLY 1

abhinavmishra14
World-Class Innovator
World-Class Innovator

What exactly you are trying to test via "spring-test"? What is the use case ? If you can elaborate your requirement, it will be helpful to understand and suggest the possible options.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)