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.
Post this in developer community. You will probably get better response. https://community.developer.atlassian.com/
Thanks, Here is link to developer community question https://community.developer.atlassian.com/t/unable-to-perform-integration-testing-for-jira-plugin-getting-no-form-present-error/31913
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.