AnsweredAssumed Answered

Remote unit testing

Question asked by gjongerh on Nov 10, 2015
Latest reply on Jan 31, 2016 by albertorugnone
With SDK 2.1.1 I like to use remote unit testing. Am i right that it should work with all-in-one and alfresco-repo amp?

What is working:
from Eclipse the jUnit test without a running alfresco. oke. Every start takes me 15sec and not a quicker start the second and third time.
with all-in-one in two terminals session "mvn integration-test -Pall-in-one" and "mvn test" works

What is not working:
With the alfresco repo AMP, both commandline and Eclipse, there will be an error when starting the jUnit test

ava HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Running com.virtorg.demoamp.test.DemoComponentTest
java.lang.RuntimeException: Unable to send request to http://localhost:4578/com.virtorg.demoamp.test.DemoComponentTest?method=testChildNodesCount&runner=org.springframework.test.context.junit4.SpringJUnit4ClassRunner: <html>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 com.virtorg.demoamp.test.DemoComponentTest</title>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /com.virtorg.demoamp.test.DemoComponentTest. Reason:
<pre>    com.virtorg.demoamp.test.DemoComponentTest</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>


   at com.tradeshift.test.remote.internal.InternalRemoteRunner.handleError(
   at com.tradeshift.test.remote.internal.InternalRemoteRunner.runChild(
   at com.tradeshift.test.remote.internal.InternalRemoteRunner.runChild(
   at org.junit.runners.ParentRunner$
   at java.util.concurrent.Executors$
   at java.util.concurrent.ThreadPoolExecutor.runWorker(
   at java.util.concurrent.ThreadPoolExecutor$
java.lang.RuntimeException: Unable to send request to http://localhost:4578/com.virtorg.demoamp.test.DemoComponentTest?method=testWiring&runner=org.springframework.test.context.junit4.SpringJUnit4ClassRunner: <html></blockcode>

Is there a solution to use jUnit testing with the Alfresco repo AMP?

All projects are created with "mvn archetype:generate -Dfilter=org.alfresco:". And using the default test from the artifact.

Thxs Gerard