Appleteer - applet test tool

Never fear, Appleteer is here!

Appleteer is an applet testing tool that is superior to Sun's own AppletViewer in a number of key ways.

Appleteer feature list

  • Loads applet web pages in an applet enabled JEditorPane.
  • Supports multiple applets on the same page, along with applet communication/object sharing & the 1.4+ InputStream sharing mechanism.
  • Supports the applet showDocument()/showStatus methods.
  • Helps avoid applet class caching.
  • Allows inspection of
    • The getAppletInfo() & getParameterInfo() defined for the applet.
    • Parameters requested by applet code. Very handy for poorly documented applets!
  • Can provide easy access to the following information.
    • Split output and error streams,
    • Has in-built logging, and all applet logs to the anonymous logger are added to the main log. Along with easy configuration of..
      • Log level.
      • Log history length.
    • Applet lifecycle Throwables logged.

Running Appleteer

The Appleteer test tool can be used as an applet or application.

Applet

To use Appleteer as an applet, visit the form to provide a starting URL or File, choose the other startup parameters, then click View Applet Page to see the page displayed in the Appleteer GUI.

Application

To use Appleteer as an application:

  • Download the latest distributable.
  • Expand the Zip archive to a convenient location.
  • Navigate to Appleteer/lib/ and double click the appleteer.jar.
URLs can be supplied once Appleteer is running and on-screen.

The application form of Appleteer can also be invoked from the command line:

  • java -jar appleteer.jar http:/url.of/applet.html
    Single argument of one URL.
  • java -jar appleteer.jar -open F:/test/applet.html
    Two arguments, the second of which is a file path/name.

Webstart Application

Launch Appleteer

If you associate .applet.html with Appleteer, you can also double click any.applet.html to have it open in Appleteer.

Related Links

Download Appleteer

Appleteer is available for download as appleteer-09.06.14.zip (114925 bytes).

Version History

Appleteer is versioned by the build date, which is added as a suffix to the download file. This date is also added into the manifest file and is shown (and logged) at runtime when the user selects the About Appleteer menu item. Please ensure you are using the latest version of Appleteer before reporting bugs!

  • appleteer-09.06.14 (114925 bytes)
    • Added a listener for the URL to be loaded in the JEditorPane, which enabled the code to do a series of actions that were formally done as soon as the call to setPage(URL) returned, or left to the end-user. This change resulted in:
      • Progress bar remains indeterminate until page and applets are fully loaded.
      • Made the inter-applet comms. functionality practical.
      • Allows applet 'auto-start'.
    • Added support for inter-applet Object sharing.
    • Added test applets.
    • Implemented InputStream size limits (64Kb) for the ApplicationAppletContext.setStream(String,InputStream) method.
    • Fixed the problem of the applet writing over GUI components for a JApplet, by adding the rootpane of the applet, rather than the applet itself. This will not work for an java.applet.Applet or for any JApplet that overrides paint(Graphics). The latter are still added directly to the parent container.
    • Logging
      • GUI
        • Swapped the log levels list for a combo box to save screen acreage.
        • Added button to Log Settings panel to Clear log in place of log label.
        • Log label removed, messages instead sent to the status line.
      • Other
        • Applet messages to the anonymous logger now added to the main log.
        • Altered the ListLogHandler to force the Source Method Name/Class to be filled in, for all log record levels. It seems that by default, the higher levels will produce a source, but not the lower levels (e.g. FINEST). Perhaps this is for performance reasons, but since this is a development tool, we feel it is best to show the source of all logging events, no matter how trivial.
        • Changed the start-up log level from FINEST to CONFIG, to match default GUI setting.
        • Appleteer debug calls to System.out redirected to log as FINEST messages.
    • Controls added to enable optimizing the Text Report.
    • A few tweaks to the frame location and size.
    • Added the parameter values to the AppletInformationPanel.
    • Changed the Implementation-Vendor field seen in the Text Report from the generic Example.com - Anyone to PSCode - Andrew Thompson.
  • appleteer-08.12.16.zip (102338 bytes) A few tweaks..
    • Added Thread.UncaughtExceptionHandler to allow most* other exceptions to be detected and logged. * The code iterates the Threads every ¼ second - a Thread might be missed if it starts and causes Exceptions entirely within that timing window.
    • Expanded the Text Report to include the Appleteer version and date, and the URL of the HTML.
    • Applet
      • Added link back to home page, to menu bar.
      • Added support for 'file' parameter.
    • Support pages
      • Added Running Appleteer anchor link to page section list in index.html.
  • appleteer-08.12.15.zip (149293 bytes) - First release of Appleteer. Announced on the comp.lang.java.programmer/help/gui usenet newsgroups on the Release: Appleteer - applet test tool thread.

Applet Environment Comparison

Feature AppletViewer Appleteer Browser
Logs missing archives No * CNFE Yes No * CNFE
Enables splitting output streams No Yes No
Provides in-built logging No Yes No
Supports multiple applets No Yes Yes
Supports inter-applet object sharing (Java 1.0+) No Yes * IAO Yes
Supports inter-applet stream sharing (Java 1.4+) No Yes Yes
Supports showStatus(message) Yes Yes Maybe * BSS
Supports showDocument(url) No Yes * JEP Maybe * BSD
Supports showDocument(url,target) No No * target Unlikely * BSD
Provides easy refresh of classes Yes Yes * CC No * AY
Provides direct access to applet start()/stop() methods. Yes Yes No
Supports MAYSCRIPT/SCRIPTABLE attributes No No * JS Yes

Notes

Test Applet Pages

Description Appleteer Browser
Applet showDocument()/showStatus() Appleteer Browser
Applet getAppletInfo()/getParameterInfo(). Load the applet in Appleteer then request the View menu Applet Info item. Appleteer Browser
Applet logging using the anonymous logger. Load the applet then
  • Examine the Java Console in the browser or
  • View the Appleteer Log List.
Appleteer Browser
Inter-applet object sharing (not hinted). Object sharing is only possible if the Always option of the Inter-Applet comms. group is enabled. Appleteer Browser
Inter-applet object sharing (hinted). Object sharing is available if either the Never or When Hinted (default) options of the Inter-Applet comms. group is enabled. Appleteer Browser
Inter-applet InputStream sharing Appleteer Browser
Inter-applet resource bleed. The JEditorPane/HTMLEditorKit used by Appleteer fails to detect any applets in the page! Most odd. Appleteer Browser
Missing resources. The JEditorPane/HTMLEditorKit used by Appleteer fails to detect the applet in the page! Appleteer Browser
Security levels (not yet implemented in Appleteer - guest Applets gain all permissions by default) Appleteer Browser

To Do

  • Security levels. Add applet 'Add SecurityManager' checkbox?
  • Further testing on class caching.
  • Further testing on page transition.
  • Tidy code enough to open source.
  • Support pages. Release 3.
  • Add Thread.UncaughtExceptionHandler.uncaughtException(Thread t,Throwable e) Added to version 08.12.16.
  • Add file parameter to Appleteer applet. Added to version 08.12.16.
  • Add link label to home page for Appleteer applet. Added to version 08.12.16.
  • Implement stream limits. Release 3.
  • try/catch around applet lifecycle calls.
  • Implement applet auto start(). Release 3.
  • Resolve the inter applet communication bug. Release 3.
  • Fix problems with rendering (applet appears on top of menus). Release 3 has a fix that works for JApplets that do not override paint(Graphics). The other kinds of applets are not worth bothering too much about.

Menus of the 1.6 AppletViewer

The Java 1.6 AppletViewer offers the following menu items:

  • Applet actions
    • Restart
    • Reload
    • Stop
    • Save
    • Start
    • Clone
  • Information
    • Tag
    • Info
    • Edit
    • Character Encoding
  • Print
    • Print
  • Applet Properties
    • Properties. Configuration dialog for Proxy server and port, as well as the security level Class access: restricted/unrestricted. The Class access: combo. setting seems to have zero effect.
  • Applet viewer actions
    • Close
    • Quit
© 2003, 2004, 2005, 2006, 2007, 2008 by Andrew Thompson. All rights reserved.
Web hosting compliments of
Java Web Hosting