I created a refapp 'atlas-create-refapp-plugin' and then without making any changes tried to run 'atlas-integration-test'. It fails to load the plugin. The console shows:
java.lang.IllegalArgumentException: The plugin key ‘${project.groupId}.${project.artifactId}-tests' must either match the OSGi bundle symbolic name (Bundle-SymbolicName) or be specified in the Atlassian-Plugin-Key manifest header
I found a similiar issue [1] and the solution was to remove src/test/resources/atlassian-plugin.xml. I tried that and then the test fails and the console shows:
org.apache.wink.client.ClientWebException at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:232) at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:189) at org.apache.wink.client.internal.ResourceImpl.get(ResourceImpl.java:302) at com.atlassian.plugins.osgi.test.AtlassianPluginsTestRunner.runViaRestCall(AtlassianPluginsTestRunner.java:99) at com.atlassian.plugins.osgi.test.AtlassianPluginsTestRunner.run(AtlassianPluginsTestRunner.java:71) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
ATLAS Version: 4.2.10
<properties> <refapp.version>2.20.0</refapp.version> <amps.version>4.2.10</amps.version> <plugin.testrunner.version>1.1.2</plugin.testrunner.version> </properties>
Community moderators have prevented the ability to post new answers.
I'm seeing similar issues with <amps.version>4.2.19</amps.version>. Additionally removing the @RunWith annotation (including constructor and calls to dependent components) from the integration test allows 'atlas-integration-test' to execute successfully. However, this essentially seems to be reverting the integration test code to an older style test prior to the introduction of the wired test runner approach. So, in this scenario, how does one get hold of the component dependencies? I tried the SAL ComponentLocator class but it doesn't appear to be initialized?
I'm confused how to integration test a refapp?!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.