Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-17855

Improve error message on missing field in webdriver tests

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4
    • Component/s: Tests
    • Tags:
    • Sprint:
      nxNag Sprint 7.4.4

      Description

      The org.nuxeo.functionaltests.Required annotation allows to ensure some element is present before going further in tests, but when there are several required field in the clqss, it's not easy to figure out which one is an issue with the following stack trace:

      org.openqa.selenium.TimeoutException: Timed out after 30 seconds waiting for org.nuxeo.functionaltests.AbstractTest$1@687e4c93
      Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
      System info: host: 'ip-10-124-4-247', ip: '10.124.4.247', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-45-generic', java.version: '1.8.0_40'
      Driver info: driver.version: unknown
      	at org.openqa.selenium.support.ui.FluentWait.timeoutException(FluentWait.java:259)
      	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:228)
      	at org.nuxeo.functionaltests.AbstractTest.fillElement(AbstractTest.java:674)
      	at org.nuxeo.functionaltests.AbstractTest.asPage(AbstractTest.java:632)
      	at org.nuxeo.functionaltests.pages.AbstractPage.asPage(AbstractPage.java:67)
      	at org.nuxeo.functionaltests.pages.DocumentBasePage.getWorkspacesContentTab(DocumentBasePage.java:273)
      	at org.nuxeo.functionaltests.AbstractTest.createWorkspace(AbstractTest.java:837)
      	at org.nuxeo.functionaltests.AbstractTest.initRepository(AbstractTest.java:808)
      	at org.nuxeo.ftest.cap.ITNoteDocumentTest.testCreateAndEditNote(ITNoteDocumentTest.java:122)
      

      => wrap the timeout exception to get something like :

      org.openqa.selenium.TimeoutException: not loaded: createNewWorkspaceLink
      Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
      System info: host: 'nocode', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.19.0-28-generic', java.version: '1.8.0_60'
      Driver info: driver.version: unknown
      	at org.nuxeo.functionaltests.AbstractTest.fillElement(AbstractTest.java:691)
      	at org.nuxeo.functionaltests.AbstractTest.asPage(AbstractTest.java:636)
      	at org.nuxeo.functionaltests.pages.AbstractPage.asPage(AbstractPage.java:67)
      	at org.nuxeo.functionaltests.pages.DocumentBasePage.getWorkspacesContentTab(DocumentBasePage.java:273)
      	at org.nuxeo.functionaltests.AbstractTest.createWorkspace(AbstractTest.java:844)
      	at org.nuxeo.functionaltests.AbstractTest.initRepository(AbstractTest.java:815)
      	at org.nuxeo.ftest.cap.ITNoteDocumentTest.testCreateComplexNote(ITNoteDocumentTest.java:79)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.nuxeo.functionaltests.LogTestWatchman$1.evaluate(LogTestWatchman.java:94)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
      	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
      Caused by: org.openqa.selenium.TimeoutException: Timed out after 5 seconds waiting for org.nuxeo.functionaltests.AbstractTest$1@46d59067
      Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
      System info: host: 'nocode', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.19.0-28-generic', java.version: '1.8.0_60'
      Driver info: driver.version: unknown
      	at org.openqa.selenium.support.ui.FluentWait.timeoutException(FluentWait.java:259)
      	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:228)
      	at org.nuxeo.functionaltests.AbstractTest.fillElement(AbstractTest.java:679)
      	... 34 more
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: