Integration testing

Hi All,

I am following the url for integration testing of my plugin.

I have assumed a few things .Please correct it if i am wrong.

1. Write a plugin with a simple submit button. This pluging will show a text "Button clicked" when someone clicks on the button.

2. I have written an integration test for this plugin following the above tutorial. ie., in the package with the class name MyComponentWiredTest which extends TestBase. The @test method calls another class which makes use the PageElement to click on a button

import org.junit.Test;
import org.junit.runner.RunWith;
import com.atlassian.jira.tests.TestBase;
import com.atlassian.plugins.osgi.test.AtlassianPluginsTestRunner;
public class MyComponentWiredTest extends TestBase
                public void testGadget(){
                                ProjectInfoDashboardGadgetIntTester tester = new ProjectInfoDashboardGadgetIntTester();

The ProjectInfoDashboardGadgetIntTester class is as follows

import com.atlassian.jira.pageobjects.pages.AbstractJiraPage;
import com.atlassian.pageobjects.elements.ElementBy;
import com.atlassian.pageobjects.elements.PageElement;
import com.atlassian.pageobjects.elements.query.TimedCondition;
public class ProjectInfoDashboardGadgetIntTester extends AbstractJiraPage{
                protected PageElement submitButton;
                public String getUrl() {
                                return "/secure/Dashboard.jspa?externalSystem=com.mycompany.groupid:project-info-dashboard-gadget-plugin";
                public TimedCondition isAt() {
                                return submitButton.timed().isVisible();
                public void submitDashboard(){

My pom.xml file has the following dependencies


Now I am not sure how the integration test will be carried out.Upon building two jar files are generated

1. actual plugin jar file

2. actualpluginjar-"tests.jar" file

How will the integration tests be carried out with these files. Should both the files be uploaded one by one?

And if i upload the "-tests.jar" file , i could see a huge difference in size between the original plugin jar file and the "-tests.jar" file. I believe some dependency jar files are attached tot he "-tests.jar" file.

And with that i get the following exception

: Unresolved constraint in bundle com.mycompany.groupid:.test-project-info-gadget-tests [186]: Unable to resolve 186.0: missing requirement [186.0] package; (

at org.apache.felix.framework.Felix.resolveBundle(

at org.apache.felix.framework.Felix.startBundle(

at org.apache.felix.framework.BundleImpl.start(

at org.apache.felix.framework.BundleImpl.start(

at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(

To some extent I understand that some jar files are bundled with the plugin which are already present in the JIRA, but I am not sure about the jar files and how it can be avoided

What i assume is as soon as i upload the "-test.jar" in the admin->manage adon section, the original plugin will be tested automatically.

Is this correct?

Also i am directly working in a development environment and my system does not have and sdk server installed. In these kind of environment how do i do the integrated testing?

Suggest some ideas

2 answers

1 accepted

2 votes
Accepted answer


The environment you describe will only be a problem in that you wouldn't be able to type atlas-run and view the results locally - BUT - maybe you don't quite understand everything the SDK brings you.

If you have the SDK installed locally then you'll be able to just type 'atlas-run' (on a working plugin source dir) and the SDK will take care of spinning up an entire functional version of whatever product you are developing for - one that you'll be able to connect to via http://localhost:2990/jira - and run all your tests locally. You don't need to install JIRA (or whatever product), get a separate license for it, etc...the SDK just provides. Very cool stuff.

If machine limitations (not enuf memory, processor, etc to handle local testing) or organizational ones (i.e. management doesn't want you to test locally) or machine policy limitations (i.e. IT has blocked all ports on your machine and won't let you change it) then you're'll need to use the remote server for testing. However, that won't limit you (any more than you're already if the previous 3 items apply) b/c you'll be able to install the two plugins created when you run atlas-package.

Now, you'll have to get shell access to the remote server so you can watch the logs, and it should be a production server as you'll be running test code on it, but you know those things.

Perhaps the examples I created for my own educational purposes would be of help:

Set of issues created to track my example's progress:

Example Code in BitBucket

From what I learned I could not get the wired test console to run any tests when I was importing jira-tests and jira-func-tests, or the testkit. Only importing testkit gave a different error (or no error, just no runnable tests) than jira-tests and jira-func-tests. So....get rid of those and create some runnable tests, or start with my example and hammer away at it until you have something working.


Hey man! You have some more reading to do!

The main thing to remember is you kinda jumped in at the deep end, i.e. most difficult, part of the Atlassian testing methodology. Trying to figure it all out from there would be quite difficult.

Most all of your questions are answered across a few of the atlassian 'how to <test type>' pages such as:


- go through each of these pages and all your basic 'how does this stuff work' type questions will get answered. I just read the pages, I didn't actually do the examples bit by bit...but I'm being a bit joking b/c I did the same as you and went to the most recent/advanced methodology and had to do all this back-tracking.

Quick answer about the 2 jars - you type (typically) atlas-clean; atlas-run <enter> and an instance of JIRA will be brought up by the SDK (which has to be installed) that you can access over port 2990/jira. If you got the dependencies right in your POM then you're plugins will already be installed for you. To test them click the 'Dev' thingy in the bottom left (if it's not already opened) and then click the far right icon. If things look good in your plugin config you'll see a 'Plugin Test Console' link that'll take you to where you can run the tests, make code corrections and reload the tests w/o having to do the whole s l o w integration test cycle. Thank JD for that.


Oh yea - there are tons of examples in bitbucket you can download to try and figure out why THERE stuff works and YOUR stuff won' least that's what I spent a _lot_ of time doing. Just go and browse the atlassian repositories here:

and check out the tutorial related projects first, then branch out to the general plugin ones.


Thanks William for the light thrown. I was more specific in my question. Hope you have read this part

"Also i am directly working in a development environment and my system does not have and sdk server installed. In these kind of environment how do i do the integrated testing?".

This means i will develop and plugin/gadget and then upload it to a dev server in a remote system where the jira is running. So with SDK installed in my desktop system but the local jira server not running how can i do this integration testing??? I am using the atlas-xxx only for creating a plugin skeleton and modifying it for eclipse ie.,


atlas-mvn eclipse:eclipse

Anyway i will go through the bitbucket .

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,723 views 17 21
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you