Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 262572

Summary: Provide infrastructure for client-side unit tests
Product: [RT] RAP Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: 1.2Keywords: plan
Target Milestone: 1.3 M2   
Hardware: All   
OS: All   
Whiteboard: plan-version=1.3 plan-status=committed plan-theme=improvements-and-consolidation
Attachments:
Description Flags
JavaScript test runner, based on qx test runner
none
JavaScript test runner, based on qx test runner
none
New testrunner none

Description Rüdiger Herrmann CLA 2009-01-27 10:45:49 EST
Plan item: Provide infrastructure for client-side unit tests
Ideally the tests could be run automated on a set of different browsers and the test results of the respective test runs can be summarized.
Comment 1 Rüdiger Herrmann CLA 2009-05-26 08:37:59 EDT
Created attachment 137144 [details]
JavaScript test runner, based on qx test runner
Comment 2 Tim Buschtoens CLA 2009-06-02 09:16:10 EDT
Created attachment 137991 [details]
JavaScript test runner, based on qx test runner

updated readme.txt
Comment 3 Rüdiger Herrmann CLA 2009-06-30 17:39:17 EDT
The required test runner is awaiting IP approval:
  3395: qooxdoo test runner Version: 0.7.4 (subset)
  https://dev.eclipse.org/ipzilla/show_bug.cgi?id=3395
Comment 4 Benjamin Muskalla CLA 2009-07-04 16:14:28 EDT
First off: great work!
Here are some points I stumbled across while writing my first test cases:
* assertNull only checks for null, not undefined. I see that assertUndefined can be used, it's just a little annoying as I'm used to use assertNull. Not sure if we need to make that difference in a test case
* Too much noise in the log by the testrunner itself due to missing images. It's hard to see the problems in the tests due to so many other log messages (used firebug)
* org.eclipse.rwt.widgets.ToolTip is missing in testincludes.js
* Using tooltips on widgets in combination with an assertNot* I always end up in an endless loop:

Error message is:
InternalError: too much recursion
Stack trace:
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:371
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:322
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:371
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:322
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:371
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:195
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:367
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:322
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:371
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:322
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:371
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:195
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:367
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:322
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:371
file:///projects/rap/org.eclipse.rap.rwt.q07.jstest/runner/qx/io/Json.js:322
...

Here is a testcase to reproduce it:

    testAssertNot : function() {
      var x = new qx.ui.basic.Image( "./runner/resource/image/class18.gif" );
      x.setToolTip( org.eclipse.rwt.widgets.ToolTip.getInstance() );
      this.assertNotNull ( x );
      //this.assertNotUndefined ( x );
    },
Comment 5 Tim Buschtoens CLA 2009-08-26 10:52:03 EDT
Created attachment 145688 [details]
New testrunner

This is the new testrunner, build from scratch. Includes 4 tests. New tests can be added in index.html.
Comment 6 Rüdiger Herrmann CLA 2009-08-27 11:40:31 EDT
Committed to CVS HEAD: org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.q07.jstest