### README for DOM API Test Execution

Solaris WinNT Linux Macintosh

Solaris

- open mozilla.csh
- make changes to variables

TEST_PATH | Absolute Directory Path where file BWTestClass.lst is located.
MOZILLA_FIVE_HOME | Absolute Path where mozilla-bin is located.
JAVA_HOME | Absolute Path to JDK dir.
USE_APPLET_FOR_REGISTRATION | Set this variable if you wish to use applet for running tests (now available under Win32 only). Otherwise hacked DOMAccessor class is used.

- source mozilla.csh this will set up the environment
- Edit BWProperties file and change the locations for variables

BW_TESTDIR | Absolute Directory Path where file BWTestClass.lst is located.
BW_LOGDIR | Absolute Directory Path where log files need to be created.
BW_THREADMODE | Indicates whether to execute tests in single-thread mode[S] or multi-thread mode[M]. Takes values S/M .
BW_HTMLTEST | URL where redirect.html, test.html files are located. Used if you run tests through TestLoader applet.
BW_XMTEST | URL where redirectxml.html, test.xml files are located. Used if you run tests through TestLoader applet

- Copy redirect.html, test.html and redirectxml.html, test.xml files to your web-servers DOCUMENT_ROOT ( By default it is assumed that they can be accessed as http://[server name]/text.html or http://[servername]/~[username]/text.html).

- Invoke autorun.sh from command prompt.

- sh autorun.sh

- The results are recorded in HTML file BWTest.html and in log file BWTest.log Individual test Log files are also found in 'log' directory.

To Invoke a specific test case

> sh autorun.sh -t org.mozilla.dom.test.AttrImpl_getName

NOTE:All Test Cases are recorded in file BWTestClass.lst.ORIG

ASSUMPTION: I assume that u have copied the files test.xml, redirectxml.html, redirect.html, test.html to your DOCUMENT_ROOT of your WebServer.
The URL it tries to load is http://[servername]/redirect.html.
If it is set in users public_html then open file autorun.sh and change DOCROOT accordingly.

Windows NT

1. Assumes you have installed PERL and the following variables are set in your environment:

- MOZILLA_HOME - top directory in mozilla's tree
- JAVA_HOME - path to JDK

2. open mozilla.bat
3. make changes to variables

- MOZILLA_BIN - Mozilla's executable file name (e.g. mozilla.exe or viewer.exe)
- TEST_PATH - path to the current directory (where mozilla.bat is)
- TEST_URL - URL where redirect.html and test.html are located (complte URL looks like that: $TEST_URL/redirect.html). Is used if you run tests through hacked DOMAccessor only.

4. execute mozilla.bat from command prompt this will create new console and set up the environment for this command prompt
5. Edit BWProperties file and change the locations for variables

- BW_TESTDIR (Absolute Directory Path where file BWTestClass.lst is located)
- BW_LOGDIR (Absolute Directory Path where log files need to be created)
- BW_THREADMODE (Execute tests in single thread [S] or multi-thread [M] mode. Takes values S/M.)
- BW_HTMLTEST (URL where redirect.html file are located. Used if you run tests through TestLoader applet)
- BW_XMLTEST (URL where test.xml file are located. Used if you run tests through TestLoader applet)

NOTE: Since on Windows file separator is a `\`, it should be escaped by
another '\'. So if a file is in c:\mozilla\tests then it would be written as c:\\mozilla\\tests.
6. There are several ways to run tests:

- Invoke autorun.pl from command prompt.
perl autorun.pl
For each test new Mozilla is executed.
- For quick testing say
mozilla.exe file:/TestLoaderHTML.html
(mozilla.exe file:/TestLoaderXML.html)
if you use applet for registration
- or say
mozilla.exe file:/redirect.html
if you use hacked DOMAcceessor.

7. The results are recorded in HTML file BWTest.html and in log file BWTest.log Individual test Log files are also found in 'log' directory.