You are currently viewing a snapshot of taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to, please file a bug.

XPInstall QA - Getting Started

by David Epstein
maintained by Jimmy Lee and Grace Bush

This page will help you get started with XPInstall testing. XPInstall is a convenient way to upgrade your software. It allows users to install packages, themes, files, directories, and perform a host of file operations such as copying a file from one location to another. Test cases are executed by triggering .xpi files (.xpi is an archive format).

Try out our latest released build and do some testing.

  • Make sure to read the release notes.
  • Download the build, install, and run the application.
  • Now you're ready to start your triggering adventure.

Here are the steps for triggering a .xpi test case:

  • Go to XPInstall Test Page.
  • Select an item from the Acceptance or Functional Test Case menu.
  • Press the Trigger button.
  • When you see the "Items to install" dialog, press Install.
  • Check your hard drive for installed contents.
  • Check the logfile called install.log for test results. Located in program folder.

Triggering test cases by clicking file name (mime type support):

Alternatively, you can trigger a .xpi test case simply by clicking on it.

Some tips for verifying test cases:

  • When something is installed on your hard drive, make sure it corresponds to the location mentioned in the log file.
  • The log file entry should indicate whether a test case has succeeded or failed. Errors are reported by error number.
  • Here's an example of a successful log file entry:
http://jimbob/jars/a_addtestfile.xpi -- 06/01/2000 17:21:25
Acceptance: a_addtestfile
[1/2] Create Folder: C:\Program Files\Netscape\Netscape6\testFolder
[2/2] Installing: C:\Program Files\NetscapeNetscape6\testFolder\smrtupdt.txt
Install completed successfully
Finished Installation 06/01/2000 17:21:25

Here's an example of a test case that didn't go too well:

file:///C|/XPIStage/test/test.xpi -- 05/31/2000 18:22:09
Acceptance: a_getfolder_win_fileurl
Install **FAILED** with error -229
Install **FAILED** with error -229
Finished Installation 05/31/2000 18:22:09

Creating new test cases:

If you want to help out by creating new test cases, here's what to do:

  • Write a test case in JavaScript. Use one or more of the XPInstall APIs.
  • Name the script install.js.
  • Zip up the script and any other file or executable into an .xpi archive.
  • Send us the archive and we'll review it.

Here is a sample install.js file (installs a text file):

var regName = "a_addtextfile";
var vi = "";
var xpiSource = "foo.txt";

initInstall("Acceptance: a_addtextfile", "addtextfile", vi, 0);
f = getFolder("Program", "a_addtextfile");
err = addFile(regName, vi, xpiSource, f, xpiSource, true);
logComment("add file should return 0 (success) = " + err);

if (0 == getLastError())

If you have any suggestions or ideas, contact us.

Did you find a bug? Go to Mozilla's bug tracking system called Bugzilla.

  • Get a Bugzilla account. You have to do this in order to enter or update/comment in any bug reports
  • Read the bug writing guidelines. Or you can use the bug writing helper.
  • Want to review some open XPInstall bugs? For example, here is a list of all open XPInstall bugs.
  • Some points to keep in mind: If you think that you've found a bug, you should:
    • perform a search to see if the bug has already been reported
    • check the XPInstall development newsgroup to see if there has been recent discussion on a feature
    • if a search doesn't turn up a bug report, go ahead and file one, making sure you follow the bug writing guidelines
    • if you are unsure of how to perform a search, please check with us
    • narrow your search by setting Program = Browser and Component = Installer:XPInstall Engine

You've been a great help!

Thank you for your participation. We greatly value your input and efforts.
Please send feedback, questions, and test results to us.