SWT Test Plan

Tests

In the following descriptions, the SWT examples referred to are found in the dev.eclipse.org GIT repository as follows:

  1. Verify tools are up to date
    1. Ensure all public API is exercised through a JUnit test

    2. -to ensure all cases are covered, we need to inspect the tests manually for API changed in this release
    3. Ensure ControlExample allows you to set all supported style bits and all settable properties for all native widgets

    4. -repeat with the CustomControlExample
    5. Ensure ClipboardExample covers all provided data types and all widgets that support copy and paste
    6. Ensure DNDExample covers all provided data types and all widgets including custom widgets
  2. Verify API behaviour
    1. Ensure all public and protected API is identical across platforms

    2. -this is done by examining the public and protected classes, methods and fields and comparing to the Windows API
    3. Execute all JUnit tests and report errors and failures
  3. Verify Visual Appearance
    1. Examine visual appearance for all combinations of style bits and settable parameters.

    2. -this is done using the ControlExample
      -repeat for a variety of fonts and skins/themes
      -use NLS translation file for locale
      -look for flash and cheese when resizing and when overlapping with another window
      -repeat with DBCS characters where applicable
      -repeat with the CustomControlExample
    3. Visually examine the preferred size for each widget

    4. -this is done using the ControlExample and selecting the "preferred size" checkbox
      -make sure that all parts of the widget can be seen properly
      -repeat for a variety of fonts and skins/themes
      -repeat for all style bits and settable properties
      -repeat with DBCS characters where applicable
      -repeat with the CustomControlExample
  4. Widget behaviour
    1. Exercise each widget and ensure behaviour is correct for the platform

    2. -this is done using the ControlExample
      -to verify correct platform behaviour, compare with native applications. On Windows use Control Spy examples, on GTK use the GTK demo, we need to identify similar standard applications on other platforms
      -test behaviour with all styles and all settable properties
      -repeat with DBCS characters where applicable
    3. Test Clipboard interaction

    4. -this is done using the ClipboardExample
      -copy data within the ClipboardExample
      -copy data from ClipboardExample to another application
      -copy data from another application to the ClipboardExample
      -repeat for all data types and widgets
      -repeat with DBCS characters where applicable
    5. Test Drag and Drop

    6. -this is done using the DNDExample
      -repeat for all operation combinations and all type combinations
      -repeat for all widgets
      -drag data within the DNDExample
      -drag data from DNDExample to another application
      -drag data from another application to the DNDExample
      -repeat for all data types and widgets
      -repeat with DBCS characters where applicable
    7. Test Accessibility (Windows, GTK, OS X)

    8. -this is done using the ControlExample
      -on Windows use JAWS and Active Accessibility Object Inspector to verify results
      -on GTK use Gnopernicus and Ferret to verify results
      -on OS X turn on the VoiceOver screen reader
      -for each widget including custom widgets make sure that the name, role, state and value is correct
      -repeat with DBCS characters where applicable
      -repeat with the CustomControlExample
    9. Test Web Browser

    10. Run the Web Browser example as a plugin within Eclipse.
      Navigate to 'rich' webpages such as www.cnn.com, www.ibm.com. Browse, resize, click, try to break things.
      Run the Browser Demo example as a plugin within Eclipse.
      Try the different panes in the Browser Demo example.
      The BrowserExample should run on the supported platforms.
      On unsupported platforms, verify that the browser example fails gracefully (no GP).
  5. Cross platform consistency
    1. Test that the events received are consistent across platforms
      -use the ControlExample and open the event console using the menu Control -> Log Events
      -exercise each widget and compare result with Windows
  6. Performance
    1. Add benchmark measurements to all JUnit tests
    2. Run JUnit tests with benchmarks

    3. -compare results from the last SWT release (where possible)
      -compare results across all platforms
  7. Standalone SWT
    1. Install the Standalone version of SWT - See the section titled "SWT Binary and Source" near the bottom of the Eclipse download page
    2. Make sure that the installation of SWT includes the following items:

      Windows

      • about.html
      • src.zip
      • swt.jar
      • swt-debug.jar
      • Ijg_readme
      • mpl-v11.txt

      GTK

      • about.html
      • src.zip
      • swt.jar
      • swt-debug.jar
      • about_cairo.html [Linux only]
      • Ijg_readme
      • lgpl-v21.txt
      • mpl-v11.txt
      • pixman-licences.txt [Linux only]

      Motif

      • about.html
      • src.zip
      • swt.jar
      • swt-debug.jar
      • about_cairo.html [Linux-only]
      • about_open_motif.html [Linux-only]
      • Ijg_readme
      • lgpl-v21.txt [Linux-only]
      • mlpl-v10.html [Linux-only]
      • mpl-v11.txt [Linux-only]
      • pixman-licences.txt [Linux-only]

      Mac (Cocoa and Carbon)

      • about.html
      • src.zip
      • swt.jar
      • swt-debug.jar
      • Ijg_readme
      • mpl-v11.txt

    3. Install the SWT examples from the Eclipse download page
    4. Run the control example using a command like the following:

      Windows

      java -classpath C:\SWT\swt.jar;C:\eclipse\plugins\org.eclipse.swt.examples_<version>\swtexamples.jar org.eclipse.swt.examples.controlexample.ControlExample

      GTK and Motif

      java -classpath /home/me/SWT/swt.jar:/home/me/eclipse/plugins/org.eclipse.swt.examples_<version>/swtexamples.jar org.eclipse.swt.examples.controlexample.ControlExample

      Mac

      java -XstartOnFirstThread -classpath /home/me/SWT/swt.jar:/home/me/eclipse/plugins/org.eclipse.swt.examples_<version>/swtexamples.jar org.eclipse.swt.examples.controlexample.ControlExample

    5. Ensure that the example comes up successfully and runs.
  8. Eclipse
    1. Open several dialogs - check for modality
    2. Open several Views
    3. Open several Perspectives
    4. Invoke several keyboard accelerators
    5. Invoke several menus and context menus
    6. Navigate around windows using keyboard
    7. Check for platform consistency

    8. -look for application defined capabilities that are not consistent with platform behaviour
      (e.g. menus coming up on mouse up rather than mouse down on motif/mac)
      (e.g. Control key accelerators defined on mac)

If you are interested in helping with the SWT testing activities, please email platform-swt-dev@eclipse.org indicating which of the above testing activities you would like to participate in.