AnsweredAssumed Answered

Unit test cases for Java Controller based Webscripts in Alfresco

Question asked by sarakahn on Mar 4, 2019
Latest reply on Mar 5, 2019 by krutik.jayswal

I plan to unit test the webscripts that had Java as controllers. I have found two approaches.

1) Go along the lines of bootstrap code

2) Follow Here, the test classes extend org.alfresco.repo.web.scripts.BaseWebScriptTest.

For the second approach, I tried adding the following dependency, but cannot find this BaseWebScriptTest.

<!-- --> <dependency>     <groupId>org.alfresco</groupId>     <artifactId>alfresco-remote-api</artifactId>     <version>5.2.b-EA</version> </dependency>

I tried adding <classifier>tests</classifier> to the above dependency as well. But, cannot find this class.

How can this issue be resolved? Also, which approach is suggested?