Menu

#7 Many bug fixes and features don't have test cases

open
None
5
2008-02-12
2008-02-06
Mirko Raner
No

In the last weeks and months many bugs were fixed and many new features added. However, for most of these changes no new test cases were added.

Test cases should be added for:

- every bug fixed
- every new feature added
- every example shown in the documentation
(or at least a very similar example that can easily
be checked)

Specifically, test cases for elements that support nested <dialog> elements should be added. There should be separate test cases that check scripts where no nested <dialog> was specified and scripts where multiple nested dialogs were specified.

Discussion

  • Mirko Raner

    Mirko Raner - 2008-02-12

    Logged In: YES
    user_id=738867
    Originator: YES

    A test case for bug 1851718 was added in revision 46.

     
  • Mirko Raner

    Mirko Raner - 2008-02-12
    • assigned_to: nobody --> raner
     
  • Mirko Raner

    Mirko Raner - 2008-07-13

    Logged In: YES
    user_id=738867
    Originator: YES

    There are a few test cases which consistently hang and have been taken out (actually, they have just been renamed from "test..." to "doNotTest..."). These test cases mainly test execution of commands or involve separate launches that are started inside the test workbench. It is not entirely clear why these test cases hang while the functionality works without problems when triggered manually. However, the stack traces show that there are some differences between invoking functionality manually and as a JUnit plug-in test.

    For example, when launched manually, Escripts will run in its own thread:

    Thread [Thread-4] (Suspended)
    Object.wait(long) line: not available [native method]
    WaitElement.execute() line: 204
    EscriptsEngine.runScript(File) line: 111
    EscriptsLaunchDelegate.run() line: 100
    Thread.run() line: 595

    At the same time, the main thread that is running the workbench is idling:

    Thread [main] (Suspended)
    OS.Call(int, int, int, int) line: not available [native method]
    Display.sleep() line: 3681
    IDEWorkbenchAdvisor(WorkbenchAdvisor).eventLoopIdle(Display) line: 362
    Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2390
    Workbench.runUI() line: 2353
    Workbench.access$4(Workbench) line: 2219
    Workbench$4.run() line: 466
    Realm.runWithDefault(Realm, Runnable) line: 289
    Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 461
    PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149
    IDEApplication.start(IApplicationContext) line: 106
    EclipseAppHandle.run(Object) line: 169
    EclipseAppLauncher.runApplication(Object) line: 106
    EclipseAppLauncher.start(Object) line: 76
    EclipseStarter.run(Object) line: 363
    EclipseStarter.run(String[], Runnable) line: 176
    NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
    NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
    Method.invoke(Object, Object...) line: 585
    Main.invokeFramework(String[], URL[]) line: 508
    Main.basicRun(String[]) line: 447
    Main.run(String[]) line: 1173
    Main.main(String[]) line: 1148

    In contrast to this, JUnit plug-in tests actually run in the main thread themselves:

    Thread [main] (Suspended)
    Object.wait(long) line: not available [native method]
    WaitElement.execute() line: 204
    EscriptsEngine.runScript(File) line: 111
    ElementTest.runTestedScript() line: 431
    ElementTest.testWaitElement() line: 379
    NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
    NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
    Method.invoke(Object, Object[]) line: 324
    ElementTest(TestCase).runTest() line: 164
    ElementTest(TestCase).runBare() line: 130
    TestResult$1.protect() line: 106
    TestResult.runProtected(Test, Protectable) line: 124
    TestResult.run(TestCase) line: 109
    ElementTest(TestCase).run(TestResult) line: 120
    JUnit3TestReference.run(TestExecution) line: 130
    TestExecution.run(ITestReference[]) line: 38
    RemotePluginTestRunner(RemoteTestRunner).runTests(String[], String, TestExecution) line: 460
    RemotePluginTestRunner(RemoteTestRunner).runTests(TestExecution) line: 673
    RemotePluginTestRunner(RemoteTestRunner).run() line: 386
    RemotePluginTestRunner.main(String[]) line: 58
    UITestApplication$1.run() line: 122
    RunnableLock.run() line: 35
    UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 123
    Display.runAsyncMessages(boolean) line: 3296
    Display.readAndDispatch() line: 2974
    Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2389
    Workbench.runUI() line: 2353
    Workbench.access$4(Workbench) line: 2219
    Workbench$4.run() line: 466
    Realm.runWithDefault(Realm, Runnable) line: 289
    Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 461
    PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149
    IDEApplication.start(IApplicationContext) line: 106
    UITestApplication.start(IApplicationContext) line: 52
    EclipseAppHandle.run(Object) line: 169
    EclipseAppLauncher.runApplication(Object) line: 106
    EclipseAppLauncher.start(Object) line: 76
    EclipseStarter.run(Object) line: 363
    EclipseStarter.run(String[], Runnable) line: 176
    NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
    NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
    Method.invoke(Object, Object[]) line: 324
    Main.invokeFramework(String[], URL[]) line: 508
    Main.basicRun(String[]) line: 447
    Main.run(String[]) line: 1173
    Main.main(String[]) line: 1148

    This subtle difference is probably one of the reasons why certain Escripts functionality currently cannot be tested as a JUnit plug-in test.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.