junit.framework.AssertionFailedError: No form present

Atlassian JIRA | Alan | 7 years ago
  1. 0

    When I create a skeleton plugin, then I write a skeleton Integration test extending JIRAWebTest. Then I override setUp() then call super.setUp(). Then I include a test that does nothing. (I also have a fully developed plugin that works on a standalone both 3.11 and 3.13 and get the same error). And I get an error as follows: ------------------------------------------------------------------------------- Test set: it.AdminInstanceActionTest ------------------------------------------------------------------------------- Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.235 sec <<< FAILURE! testThis(it.AdminInstanceActionTest) Time elapsed: 0.094 sec <<< FAILURE! junit.framework.AssertionFailedError: No form present at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at net.sourceforge.jwebunit.WebTester.assertFormPresent(WebTester.java:353) at net.sourceforge.jwebunit.WebTester.setFormElement(WebTester.java:787) at net.sourceforge.jwebunit.WebTestCase.setFormElement(WebTestCase.java:317) at com.atlassian.jira.webtests.JIRAWebTest.setupJIRAstep1(JIRAWebTest.java:580) at com.atlassian.jira.webtests.JIRAWebTest.setupJIRA(JIRAWebTest.java:488) at com.atlassian.jira.webtests.JIRAWebTest.init(JIRAWebTest.java:463) at com.atlassian.jira.webtests.JIRAWebTest.setUp(JIRAWebTest.java:447) at it.AdminInstanceActionTest.setUp(AdminInstanceActionTest.java:29) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125) at org.apache.maven.surefire.Surefire.run(Surefire.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)

    Atlassian JIRA | 7 years ago | Alan
    junit.framework.AssertionFailedError: No form present
  2. 0

    When I create a skeleton plugin, then I write a skeleton Integration test extending JIRAWebTest. Then I override setUp() then call super.setUp(). Then I include a test that does nothing. (I also have a fully developed plugin that works on a standalone both 3.11 and 3.13 and get the same error). And I get an error as follows: ------------------------------------------------------------------------------- Test set: it.AdminInstanceActionTest ------------------------------------------------------------------------------- Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.235 sec <<< FAILURE! testThis(it.AdminInstanceActionTest) Time elapsed: 0.094 sec <<< FAILURE! junit.framework.AssertionFailedError: No form present at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at net.sourceforge.jwebunit.WebTester.assertFormPresent(WebTester.java:353) at net.sourceforge.jwebunit.WebTester.setFormElement(WebTester.java:787) at net.sourceforge.jwebunit.WebTestCase.setFormElement(WebTestCase.java:317) at com.atlassian.jira.webtests.JIRAWebTest.setupJIRAstep1(JIRAWebTest.java:580) at com.atlassian.jira.webtests.JIRAWebTest.setupJIRA(JIRAWebTest.java:488) at com.atlassian.jira.webtests.JIRAWebTest.init(JIRAWebTest.java:463) at com.atlassian.jira.webtests.JIRAWebTest.setUp(JIRAWebTest.java:447) at it.AdminInstanceActionTest.setUp(AdminInstanceActionTest.java:29) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125) at org.apache.maven.surefire.Surefire.run(Surefire.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)

    Atlassian JIRA | 7 years ago | Alan
    junit.framework.AssertionFailedError: No form present
  3. 0

    While executing the integration tests, the initialisation of the tests fail. Below is my test class: {code} public class StoryTest extends JIRAWebTest { private IssueSoapServiceServiceLocator mLocator = null; public StoryTest() { super("StoryTest"); } @Override public void setUp() { super.setUp(); --> THE EXCEPTION IS RAISED HERE // Restore the test data (in memory database) before running a test restoreData("defaultdata.xml"); // Initialise the service locator mLocator = new IssueSoapServiceServiceLocator(); } {code} The output on the console looks like: {code} ------------------------------------------------------- T E S T S ------------------------------------------------------- Running it.StoryTest . ===FTC Started : StoryTest.testStories #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 : StoryTest.testStories #1 of 0 (0.0%) : Errors 1 (0.0%) : Run time 0.12 seconds : Suite time 0.47 seconds : HTTP Count 0 : HTTP Time 0ms : HTTP 100th -1ms : HTTP 90th -1ms : HTTP 50th -1ms : HTTP Ave 0.00 ms/request : Max Mem 765394944 : Total Mem 53149696 : Free Mem 48205136 . [junit.framework.AssertionFailedError: No form present] . ______________________________ . Test Failures So Far : . ===FTC FAIL : it.StoryTest.testStories . . ______________________________ . {code} ... and the detailed output from the unit tests is: {code} ------------------------------------------------------------------------------- Test set: it.StoryTest ------------------------------------------------------------------------------- Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.557 sec <<< FAILURE! testStories(it.StoryTest) Time elapsed: 0.523 sec <<< FAILURE! junit.framework.AssertionFailedError: No form present at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at net.sourceforge.jwebunit.WebTester.assertFormPresent(WebTester.java:353) at net.sourceforge.jwebunit.WebTester.setFormElement(WebTester.java:787) at com.atlassian.jira.functest.framework.setup.JiraSetupInstanceHelper.blatInValidLicense(JiraSetupInstanceHelper.java:125) at com.atlassian.jira.functest.framework.setup.JiraSetupInstanceHelper.setupJIRA(JiraSetupInstanceHelper.java:85) at com.atlassian.jira.functest.framework.setup.JiraSetupInstanceHelper.ensureJIRAIsReadyToGo(JiraSetupInstanceHelper.java:48) at com.atlassian.jira.webtests.JIRAWebTest.init(JIRAWebTest.java:7646) at com.atlassian.jira.webtests.JIRAWebTest.setUp(JIRAWebTest.java:7633) at it.StoryTest.setUp(StoryTest.java:20) at junit.framework.TestCase.runBare(TestCase.java:132) at com.atlassian.jira.webtests.JIRAWebTest.runBare(JIRAWebTest.java:7710) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:91) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) {code} I have found a related bug [here|http://jira.atlassian.com/browse/JRA-18421] which talks about an old license.

    Ecosystem JIRA | 7 years ago | Cyrilll Rüttimann
    junit.framework.AssertionFailedError: No form present
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Intermittent testShellStage failure

    GitHub | 2 years ago | timwr
    junit.framework.AssertionFailedError: MagicToken missing in shell output:
  6. 0

    testCorrectNamesMultiThread fails

    GitHub | 4 years ago | alexnederlof
    junit.framework.AssertionFailedError: Thread 1 ok

  1. cesarnog 2 times, last 2 months ago
  2. Ábó Szilágyi 5 times, last 7 months ago
1 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. junit.framework.AssertionFailedError

    No form present

    at junit.framework.Assert.fail()
  2. JUnit
    Assert.assertTrue
    1. junit.framework.Assert.fail(Assert.java:47)
    2. junit.framework.Assert.assertTrue(Assert.java:20)
    2 frames
  3. net.sourceforge.jwebunit
    WebTestCase.setFormElement
    1. net.sourceforge.jwebunit.WebTester.assertFormPresent(WebTester.java:353)
    2. net.sourceforge.jwebunit.WebTester.setFormElement(WebTester.java:787)
    3. net.sourceforge.jwebunit.WebTestCase.setFormElement(WebTestCase.java:317)
    3 frames
  4. com.atlassian.jira
    JIRAWebTest.setUp
    1. com.atlassian.jira.webtests.JIRAWebTest.setupJIRAstep1(JIRAWebTest.java:580)
    2. com.atlassian.jira.webtests.JIRAWebTest.setupJIRA(JIRAWebTest.java:488)
    3. com.atlassian.jira.webtests.JIRAWebTest.init(JIRAWebTest.java:463)
    4. com.atlassian.jira.webtests.JIRAWebTest.setUp(JIRAWebTest.java:447)
    4 frames
  5. it
    AdminInstanceActionTest.setUp
    1. it.AdminInstanceActionTest.setUp(AdminInstanceActionTest.java:29)
    1 frame
  6. JUnit
    TestSuite.run
    1. junit.framework.TestCase.runBare(TestCase.java:125)
    2. junit.framework.TestResult$1.protect(TestResult.java:106)
    3. junit.framework.TestResult.runProtected(TestResult.java:124)
    4. junit.framework.TestResult.run(TestResult.java:109)
    5. junit.framework.TestCase.run(TestCase.java:118)
    6. junit.framework.TestSuite.runTest(TestSuite.java:208)
    7. junit.framework.TestSuite.run(TestSuite.java:203)
    7 frames
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  8. org.apache.maven
    JUnitTestSet.execute
    1. org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
    1 frame
  9. SureFire
    Surefire.run
    1. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
    2. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
    3. org.apache.maven.surefire.Surefire.run(Surefire.java:132)
    3 frames
  10. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  11. SureFire
    SurefireBooter.main
    1. org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
    2. org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
    3. org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
    3 frames