It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unable to perform integration testing for JIRA plugin. Getting "No Form Present" error

Hi,

Im trying out integration testing for JIRA plugin development mentioned at https://developer.atlassian.com/server/jira/platform/writing-integration-tests-for-your-jira-add-on/ .

I have written below test class, 

 

package it.com.test.jira.plugin;

import com.atlassian.jira.functest.framework.FuncTestCase;
import com.atlassian.jira.functest.framework.locator.WebPageLocator;
import org.junit.Before;
import org.junit.Test;

public class MyComponentWiredTest extends FuncTestCase {
@Before
public void setUpTest()
{
log("called setUpTest()");
System.out.println("called setUpTest()");
administration.restoreData("TestShowUsersProjectPermission.xml");
}

@Test
public void testMyName() {
log("called testMyName()");
System.out.println("called testMyName()");
navigation.login("admin", "admin");
administration.usersAndGroups().addUser("fred", "password", "Fred Flintstone", "fred@example.com");
navigation.gotoAdminSection("user_browser");
tester.clickLink("fred");
text.assertTextSequence(new WebPageLocator(tester),
"Username:", "fred", "Full Name:", "Fred Flintstone", "Email:", "fred@example.com");

navigation.logout();
navigation.login("fred", "password");
navigation.logout();

}

}

 

Tried below commands in sequence :

atlas-clean

mvn install

atlas-integratio-test

 

After execution, getting below error logs : 

 

[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running it.com.aspl.jira.plugin.MyComponentWiredTest
. ===FTC Started : MyComponentWiredTest.testMyName #1 of 0
. Checking that JIRA is setup and ready to be tested...
. JIRA is not setup. Installing a new V2 license and completing setup steps
. Using a 'JIRA Enterprise: Commercial Server' license which allows -1 maximum users
. ===FTC Finished FAIL : MyComponentWiredTest.testMyName #1 of 0 (0.0%) : Errors 1 (0.0%) : Run time 0.69 seconds : Suite time 0.69 seconds : HTTP Count 0 : HTTP Time 0ms : HTTP Ave 0.00
ms/request : HTTP 100th -1ms : HTTP 90th -1ms : HTTP 50th -1ms : Max Mem 1883242496 : Total Mem 128974848 : Free Mem 100515440
. [junit.framework.AssertionFailedError: No form present]
. ______________________________
. Test Failures So Far :
. ===FTC FAIL : it.com.aspl.jira.plugin.MyComponentWiredTest.testMyName
.
. ______________________________
.
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.77 s <<< FAILURE! - in it.com.aspl.jira.plugin.MyComponentWiredTest
[ERROR] testMyName(it.com.aspl.jira.plugin.MyComponentWiredTest) Time elapsed: 0.747 s <<< FAILURE!
junit.framework.AssertionFailedError: No form present

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] MyComponentWiredTest>FuncTestCase.runBare:276->FuncTestCase.setUp:140 No form present
[INFO]
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO]
[INFO] refapp: Shutting down
[INFO] using codehaus cargo v1.6.10
[INFO] [talledLocalContainer] Tomcat 8.x is stopping...
[INFO] [talledLocalContainer] Sep 16, 2019 6:03:36 PM org.apache.catalina.core.StandardServer await
[INFO] [talledLocalContainer] INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
[INFO] [talledLocalContainer] Sep 16, 2019 6:03:36 PM org.apache.coyote.AbstractProtocol pause
[INFO] [talledLocalContainer] INFO: Pausing ProtocolHandler ["http-nio-5990"]
[INFO] [talledLocalContainer] Sep 16, 2019 6:03:37 PM org.apache.coyote.AbstractProtocol pause
[INFO] [talledLocalContainer] INFO: Pausing ProtocolHandler ["ajp-nio-8009"]
[INFO] [talledLocalContainer] Sep 16, 2019 6:03:37 PM org.apache.catalina.core.StandardService stopInternal
[INFO] [talledLocalContainer] INFO: Stopping service [Catalina]
[INFO] [talledLocalContainer] Sep 16, 2019 6:03:37 PM org.apache.catalina.core.ApplicationContext log
[INFO] [talledLocalContainer] INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: destroy called
[INFO] [talledLocalContainer] WARN - 18:03:37,168 - strumentation.expose.jmx.schedule.JmxInstrumentSchedulerImpl - [localhost-startStop-2] - atlassian-instrumentation-jmx expose schedul
er stopped.

 

I have not done any integration test before, so Im  not sure what Im doing wrong here.

 

1 answer

Post this in developer community. You will probably get better response. https://community.developer.atlassian.com/ 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

274 views 1 2
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you