mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-01 19:39:13 +00:00
<html> <head> </head> <body> <pre> Automated Webclient API testbase.<br><br><br>1. Goals.<br> The main goal of this testbase is test of Webclient API.<br> Tests covers all interfaces(so far implemented) than can be queried by application or received to application in any other way.<br> The "Webclient"(EMWindow Test application that is run from /mozilla/java/..src_moz/runwm script) is not a subject of this testbase.<br><br>2. How it works.<br> The perl script autorun.pl is used to run test application in cycles.<br> The simple test application runs and executes test class.<br> Test class queries corresponding interface, performs procedure call<br> and verifies result when possible. <br><br>3. Directory struct.<br> Source files, build files , configuration files and utils are placed in different directories. Please see the diagram below for more details.<br><br> TOP(0) <br> |<br> |-build(1)<br> | |-classes(1.1)<br> | | <br> | |-test(1.2)<br> | | |-basic(1.2.1)<br> | |-run(1.3) |-api(1.2.1.1)<br> |-src(2) |-mixed(1.2.1.2)<br> | |-classes(2.1)<br> | |<br> | |-test(2.2) <br> | | |-basic(2.2.1)<br> | | |-api(2.2.1.1) <br> | | |-mixed(2.2.1.2)<br> | |-run(2.3)<br> | |<br> | |-Killer(2.4)<br> |-utils(3)<br> |-config(4)<br> |-doc(5)<br> |-log(6)<br> <br> TOP 0) directory with testbase, in usually this dir named "automated" <br> build 1) build directory. All class and data files(exclude html and cgi files) compiled and copied to it.<br> 1.1) classes directory. <br> Directory for test classes files . User must add this directory to the CLASSPATH before executing tests.<br> 1.2, 1.2.1, 1.2.1.1, 1.2.1.2) In these directories data and properties files are copied at make stage<br> 1.3) Execution script and default list file are copied to this dir.<br> src 2) All source files placed to this dir.<br> 2.1) Directory for all Java files<br> 2.2, 2.2.1, 2.2.1.1, 2.2.1.2) Directories for data and properties files. <br> All common files can be placed to 2.2.1, 2.2.1.1, 2.2.1.2 <br> For specific test files additional dirs created in 2.2.1.1 and 2.2.1.2<br> 2.3) Directory for autorun.pl and miscellaneous list files<br> 2.4) Directory where sources of "Killer" util is placed<br> utils 3) Directory for miscellaneous utils, that is used at "make" and "run" stages.<br> config 4) Directory for configuration files. CommonProperties file. <br> PLEASE EDIT IT BEFORE RUNNING A MAKE<br> doc 5) Directory for miscellaneous documents. Documentation for testcases placed here.<br> log 6) Directory for placing execution logs.<br> <br><br> Also additional HTML_ROOT_DIR and CGI_ROOT_DIR directories used to placing CGI and HTML files.<br> <br>4. Requirements.<br> - User must have successfully built Webclient and Mozilla<br> - User must have a configured and working http/Java Web server. Otherwise user must use file:/// protocol <br> to specify HTML_ROOT .Tests( very small part of all), that uses CGI will not executed properly in such cases. <br><br>5. How to build.<br> - Please setup environment as for running Webclient. <br> - Please edit CommonProperties file in config(4) dir. This file is self documented.<br> - Go to build(1) dir and do make <br> <br><br>6. How to run.<br> - Set JAVAHOME environment variable to path to java executable.<br> - Make sure CLASSPATH is included <TOP_DIR>/build/classes<br> - Go to build/run(1.3) directory and execute autorun.pl script.<br> <br>6.1 Usage.<br> User can execute tests by different ways:<br> To execute ONE testcase just do: "perl autorun.pl -t test_case_id" <br> To execute LIST of tests just do: "perl autorun.pl -f file_with_test_ids"<br> Also user can turn TestRunner to the "mixed" mode via -m switch. "perl autorun.pl -m file file_with_mixed_tests". <br> In this mode 2 buttons "FAILED" and "PASSED" added to TestWindow <br> and tester can fail or pass test in any time. <br> This mode is NECESSARY for running tests from "mixed" sections <br><br> And via -i switch user can turn autorun to "ignorecore" mode. In<br> this mode autorun.pl ignore core and doesn't fail tests, that<br> really coredumps. This mode is useful for Solaris testing. "perl autorun.pl -i -f file_with_testids"<br><br>7. Logging.<br> - All logs are placed to the log(6) directory. A unique directory created <br> in the log(6) directory for each execution. <br> Files, created in this directory are:<br> BWTest.html - the main log file with results of execution in HTML format<br> BWTest.txt - the results of execution in TXT format<br> BWTestRun.log - the log of test execution with additional info<br> <testID>.log \<br> <testID>.log |- files with output of each testcase.<br> <testID>.log /<br><br>8. Sections.<br><br> Now testbase contains 3 different sections of tests: api, stress and mixed.<br> <br> "api" Tests from this section performs calls to api methods and verify results when <br> possible. They are fully automated and user mustn't interact<br> with application.<br><br> "stress" Tests from this section performs stress actions. E.g loading many pages,<br> calls api methods many times, etc. They are fully automated <br> and user need not interact with application. <br> <br> "mixed" Tests from this section performs calls of api methods, that can change <br> rendering/viewing behavior. Eg setBounds, moveWindowTo. User should read <br> instructions on TestWindow and pass or fail tests via corresponding buttons.<br><br>9. Things, that must be done, known bugs.<br> - Several tests on CurrentPage failed with NP exception.<br> Problem with system clipboard.<br> - Solaris: Some times no urls loaded by TestRunner at all.<br> - Webclient tests have been tested (so far) with PR3 Webclient bundled with Netscape6 SVR4pkg from SUN <br> on Sparc Solris and Intel Solaris Platforms only.<br> - Webclient Tests have not been tested with PR3 Webclinet on Win32 or Linux platoforms yet.<br> <br><br>Last Modified 08/23/2000 by avm <br>Last Modified 09/08/2000 by gv <br>Last Modified 12/15/2000 by GV<br><br><br></pre> </body> </html>