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

java.lang.Exception: No tests found in class

Anil February 21, 2019

I'm trying to run integration test

my test class is

@RunWith(AtlassianPluginsTestRunner.class)
public class MyClassTestIT extends BaseFuncTest {

private ApplicationPropertiesService applicationProperties;


public MyClassTestIT (ApplicationPropertiesService applicationProperties) {
this.applicationProperties = applicationProperties;

}

@techoneway
public void test() throws IOException, ServletException {
System.out.println(applicationProperties.getDisplayName());
Assert.assertEquals("names do not match!", "myComponent:" + applicationProperties.getDisplayName());
}
}

I have atlassian-plugin.xml under resource folder which is importing required key as well

<component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties"/>

 

but getting below error.


java.lang.Exception: No tests found in class 

at com.atlassian.plugins.osgi.test.AtlassianPluginsTestRunner.runViaRestCall(AtlassianPluginsTestRunner.java:125)
at com.atlassian.plugins.osgi.test.AtlassianPluginsTestRunner.run(AtlassianPluginsTestRunner.java:75)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

 

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 21, 2019

Hello,

Can you clarify which product this is for, and what exactly you are trying to do?

If you're developing an add-on, you might want to have a look at our Developer Community.

Regards,

Shannon

Anil February 22, 2019

Hi Shannon, 

This is for bitbucket plugin. I'm writing integration test for my plugin and its failing with above error.

I have also posted same on developer community 

https://community.developer.atlassian.com/t/writing-integration-test-for-bitbucket-plugin-development/27170

Ricardo Herrera November 7, 2019

Hi Anil, have you solved this by your own? I'm having the same problem but with Jira and it seems problem was introduced with Jira 8, if I try with any Jira version 7 test are found.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events