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

<blockcode>
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>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 com.virtorg.demoamp.test.DemoComponentTest</title>
</head>
<body>
<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>

</body>
</html>

   at com.tradeshift.test.remote.internal.InternalRemoteRunner.handleError(InternalRemoteRunner.java:189)
   at com.tradeshift.test.remote.internal.InternalRemoteRunner.runChild(InternalRemoteRunner.java:143)
   at com.tradeshift.test.remote.internal.InternalRemoteRunner.runChild(InternalRemoteRunner.java:41)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)
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

Outcomes