Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Wired Integration Tests Fail After Creating Refapp Plugin

MikeD January 8, 2014

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>

1. https://answers.atlassian.com/questions/181362/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

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Dave Lynott April 4, 2014

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?!

TAGS
AUG Leaders

Atlassian Community Events