cancel
Showing results for 
Search instead for 
Did you mean: 

Remote unit testing

gjongerh
Champ in-the-making
Champ in-the-making
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=o...: <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.spring...: <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
8 REPLIES 8

michielhuygen
Champ in-the-making
Champ in-the-making
I am having the exact same problem. When setting up a repo AMP with the sdk on windows 64-bit, I cannot run tests remotely, with the exact same error. Is there any update on this?

I tested this with the allinone archetype, here i can run and hotload the DemoComponentTest perfectly fine!

Same problem after updated from 2.0.0 to 2.1.1

albertorugnone
Champ in-the-making
Champ in-the-making
Someone had time to get a look to this problem?

Tnx Alberto

I have made few step foward but no results.
It seems that nobody starts RemoteServer of junit-remote package.
Who should be in charge to do that?

The example shown here (https://github.com/Tradeshift/junit-remote) uses ant to run server and jrebel integration. I would like use sprintload, instead. In addition I have no clear idea how to adapt this ant example to alfresco rad.

There is somebody that has already solved this problem?
Thank you very much for you help.
Alberto

gravitonian
Star Collaborator
Star Collaborator
Hi,

The Remote JUnite server should be started by Spring Beans in the alfresco-rad project. See here: https://github.com/Alfresco/alfresco-sdk/blob/master/modules/alfresco-rad/src/main/resources/alfresc..., this kicks of the RemoteRunnerWrapper in a thread and this starts the Remote JUnit runner. You should see a log when starting looking something like this:

[INFO]  Server running at http://localhost:4578

If this does not work you can try and add the alfresco-rad project dependency as follows:

<dependency>
   <groupId>org.alfresco.maven</groupId>
   <artifactId>alfresco-rad</artifactId>
   <version>${maven.alfresco.version}</version>
</dependency>


Hi Martin,
Thank you for answer.
I have already added this dependency in amp-to-war profile.
I looked for that comment and I found it, then RemoteRunnerWrapper  is listening there.

I tried to build some examples from the scratch and they work, with the only difference that the new projects compile on jdk 1.7 while my current project has to compile with 1.8.


gjongerh
Champ in-the-making
Champ in-the-making
Hi all,

I am switch to SDK2.2.0 and Alfresco 5.1.x
I still having trouble to use Unit testing. It was working with Alfresco 4.x. Has anyone use Unit testing successfull?
The dependency alfresco-rad makes no difference!

When using "mvn test" from AIO project or AMP project both work standalone and also from Eclipse (duration 16-18 seconds)

When following the instruction with SDK2.2.0: start AIO and create a runner in Eclipse for the repo-amp test. I do get a exception loading the ApplicationContext.

junit.framework.AssertionFailedError: java.lang.IllegalStateException: Failed to load ApplicationContext   at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:103)
   at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:122)
   at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
   at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
   at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:211)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:288)
   at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:284)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
   at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
   at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
   at com.tradeshift.test.remote.RemoteServer$1$1.run(RemoteServer.java:82)
   at com.tradeshift.test.remote.RemoteServer.withStream(RemoteServer.java:111)
   at com.tradeshift.test.remote.RemoteServer.access$200(RemoteServer.java:29)
   at com.tradeshift.test.remote.RemoteServer$1.handle(RemoteServer.java:79)
   at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
   at org.eclipse.jetty.server.Server.handle(Server.java:341)
   at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
   at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)
   at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
   at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
   at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:515)
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
   at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'webscript.org.alfresco.slingshot.datalists.list.get' defined in file [/Users/gjongerh/Documents/ontw/Alfresco5/vtgALF-invoice/vtgALF-invoice-repo/target/amp-war/WEB-INF/classes/alfresco/module/alfresco-share-services/module-context.xml]: Could not resolve parent bean definition 'declarativeSpreadsheetWebScript'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'declarativeSpreadsheetWebScript' is defined
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1180)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1125)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1111)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:615)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
   at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:120)
   at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
   at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:102)
   at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:246)
   at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContextInternal(CacheAwareContextLoaderDelegate.java:69)
   at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:95)
   … 34 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'declarativeSpreadsheetWebScript' is defined
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:575)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1111)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:892)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1166)
   … 45 more


   at com.tradeshift.test.remote.internal.InternalRemoteRunner.runChild(InternalRemoteRunner.java:162)
   at com.tradeshift.test.remote.internal.InternalRemoteRunner.runChild(InternalRemoteRunner.java:41)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:745)
junit.framework.AssertionFailedError: java.lang.IllegalStateException: Failed to load ApplicationContext   at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:103)
   at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:122)
   at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
   at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
   at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:211)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:288)
   at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:284)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
   at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
   at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
   at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
   at com.tradeshift.test.remote.RemoteServer$1$1.run(RemoteServer.java:82)
   at com.tradeshift.test.remote.RemoteServer.withStream(RemoteServer.java:111)
   at com.tradeshift.test.remote.RemoteServer.access$200(RemoteServer.java:29)
   at com.tradeshift.test.remote.RemoteServer$1.handle(RemoteServer.java:79)
   at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
   at org.eclipse.jetty.server.Server.handle(Server.java:341)
   at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
   at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)
   at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
   at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
   at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:515)
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
   at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'webscript.org.alfresco.slingshot.datalists.list.get' defined in file [/Users/gjongerh/Documents/ontw/Alfresco5/vtgALF-invoice/vtgALF-invoice-repo/target/amp-war/WEB-INF/classes/alfresco/module/alfresco-share-services/module-context.xml]: Could not resolve parent bean definition 'declarativeSpreadsheetWebScript'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'declarativeSpreadsheetWebScript' is defined
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1180)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1125)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1111)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:615)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
   at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:120)
   at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
   at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:102)
   at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:246)
   at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContextInternal(CacheAwareContextLoaderDelegate.java:69)
   at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:95)
   … 34 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'declarativeSpreadsheetWebScript' is defined
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:575)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1111)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:892)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1166)
   … 45 more


   at com.tradeshift.test.remote.internal.InternalRemoteRunner.runChild(InternalRemoteRunner.java:162)
   at com.tradeshift.test.remote.internal.InternalRemoteRunner.runChild(InternalRemoteRunner.java:41)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:745)


When starting (./run.sh) the AIO or AMP project, and then starting "mvn test" gives the same error.
When starting (./run.sh) AMP project without the "alfresco-rad", and then starting a unit-test gives the same error


Running com.virtorg.alf.invoice.ContentModelTest
java.lang.RuntimeException: Unable to send request to http://localhost:4578/com.virtorg.alf.invoice.ContentModelTest?method=testInvoice&runner=org.springf...: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 com.virtorg.alf.invoice.ContentModelTest</title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /com.virtorg.alf.invoice.ContentModelTest. Reason:
<pre>    com.virtorg.alf.invoice.ContentModelTest</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:290)
   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.alf.invoice.ContentModelTest?method=testGetCompanyHome&runner=org....: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 com.virtorg.alf.invoice.ContentModelTest</title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /com.virtorg.alf.invoice.ContentModelTest. Reason:
<pre>    com.virtorg.alf.invoice.ContentModelTest</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:290)
   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)
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.267 sec <<< FAILURE! - in com.virtorg.alf.invoice.ContentModelTest
testInvoice(com.virtorg.alf.invoice.ContentModelTest)  Time elapsed: 0.036 sec  <<< ERROR!
java.lang.RuntimeException:
Unable to send request to http://localhost:4578/com.virtorg.alf.invoice.ContentModelTest?method=testInvoice&runner=org.springf...: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 com.virtorg.alf.invoice.ContentModelTest</title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /com.virtorg.alf.invoice.ContentModelTest. Reason:
<pre>    com.virtorg.alf.invoice.ContentModelTest</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>

</body>
</html>

testGetCompanyHome(com.virtorg.alf.invoice.ContentModelTest)  Time elapsed: 0.005 sec  <<< ERROR!
java.lang.RuntimeException:
Unable to send request to http://localhost:4578/com.virtorg.alf.invoice.ContentModelTest?method=testGetCompanyHome&runner=org....: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 com.virtorg.alf.invoice.ContentModelTest</title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /com.virtorg.alf.invoice.ContentModelTest. Reason:
<pre>    com.virtorg.alf.invoice.ContentModelTest</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>

</body>
</html>

Results :

Tests in error:
  ContentModelTest.testGetCompanyHome » Runtime Unable to send request to http:/…
  ContentModelTest.testInvoice » Runtime Unable to send request to http://localh

Tests run: 2, Failures: 0, Errors: 2, Skipped: 0

[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 5.083 s
[INFO] Finished at: 2016-07-06T13:32:25+02:00
[INFO] Final Memory: 30M/605M
[INFO] ————————————————————————



Please help does somebody has unit-testing working.

gjongerh
Champ in-the-making
Champ in-the-making
I found this workaround. The Unit test is working. Not is quick as used to be, but does work with a existing started AMP REPO project
https://forums.alfresco.com/forum/developer-discussions/development-environment/mvn-amp-project-juni...

changed

@RunWith(RemoteTestRunner.class)
@Remote(runnerClass = SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:alfresco/application-context.xml")

in

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:alfresco/application-context.xml")