Jira plugin wired integration tests?

Brenden Black September 13, 2017

 

I spent the day following a number of apparently out-of-date tutorials and documentation, particularly Run Wired Tests with the Plugin Test Console trying to figure out a usable integration testing solution

However, like that doc says "While the atlas-unit-test and atlas-integration-test commands allow you to run tests from the command line, neither allowed for a fast development process." The Plugin Test Console seems to be what I'm after... but it doesn't seem to exist?

 There is no Developer Toolbar in the lower left corner, in Chrome or IE, (other people have noticed this too) but I can get to a Developer Toolbox by navigating directly to http://localhost:2990/jira/plugins/servlet/developer-toolbox The Toolbox doesn't have anything test console related, but it does mention FastDev which I understand has long been deprecated in favour of QuickReload. So is this still the recommended approach? 

 

atlas-version:
ATLAS Version: 6.2.14
AMPS Version: 6.2.14

developer toolbox:
Jira version: 7.2.2
Atlassian SDK version: 6.2.11

 

1 answer

2 votes
Alexej Geldt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 19, 2017

The Plugin Test Console seems to be what I'm after... but it doesn't seem to exist?

It's because atlassian is now now using quickreload in favor of fastdev (since JIRA6 i guess)

Test Console was part of fastdev. When you started a plugin with fastdev there was a special developer toolbar on the bottom of the browser which allowed to access the test console and run wired integration tests using UI inside running instance without having to use console. 

Since they have switched to quickreload, this is no longer supported.  The developer toolbar doesn't exist anymore with quickreload.

As far i can see you have two options.

1. It is still possible to switch back to fastdev with jira7 and atlassian-sdk6 in the pom.xml of your plugin in configuration of maven-jira-plugin. Set enableQuickReload to false, and enableFastdev to true. 

However, you should know atlassian recommends using quickreload and they are going to switch off the support for fastdev soon. So you would face the same problem when you upgrade to next version propably.

Also quickreload has some advanteges. In example you don't need to restart the instance when you change plugin descriptors or the pom. With fastdev you have to.

2. There is a (nasty) workaround i was able to find. But i didn't try myself yet.

https://community.atlassian.com/t5/Questions/Atlassian-Plugin-Test-Console-and-QuickReload/qaq-p/371152

Brenden Black October 19, 2017

I eventually stumbled on that same workaround and tried it out; it does actually work. It isn't pretty, but it works! Along with navigating directly to http://localhost:2990/jira/plugins/servlet/it-test-console I can now use the test console and QuickReload.

 

I've upgraded my main plugin to use the Spring Scanner 2 (described here), but the test package is still the old version. The biggest shortcoming of this setup is that I haven't been able to get the ExportAsDevService annotation to work, but ExportAsService does. So that just means I'm exporting/exposing more of my plugin than I want to but that's easy enough to live with.

Suggest an answer

Log in or Sign up to answer