关于测试实用程序 > Using the Arbortext Publishing Engine 测试实用程序 > Starting the Arbortext Publishing Engine 测试实用程序
  
Starting the Arbortext Publishing Engine 测试实用程序
You can launch the Arbortext Publishing Engine 测试实用程序 as a stand-alone program or in embedded mode from the Arbortext Publishing Engine InteractiveTools menu.
In embedded mode, the Arbortext Publishing Engine 测试实用程序 does not require a running Arbortext PE 服务器. The applications, by default, are executed inside Arbortext Publishing Engine Interactive in a simulated Arbortext Publishing Engine environment. This mode is useful for debugging and testing Arbortext Publishing Engine applications.
Refer to Example of Creating and Running a Test for information on running a test in embedded mode.
In stand-alone (server) mode, the Arbortext Publishing Engine 测试实用程序 requires a running Arbortext PE 服务器. The applications are invoked using HTTP and executed on the server. This mode is useful for testing a deployed application running in a true Arbortext Publishing Engine environment.
Refer to Example of Creating and Running a Test for information on running a test in server mode.
When started in stand-alone mode, the Arbortext Publishing Engine 测试实用程序 lets you run applications that are deployed on a running Arbortext PE 服务器. Requests are sent following HTTP protocol.
To start the Arbortext Publishing Engine 测试实用程序 in stand-alone (server) mode:
1. Type the e3test command and the appropriate optional arguments from within the PE_HOME\e3\bin subdirectory at a command prompt, following the form:
e3test -d dtdfile -f testfile -l logfile -s server -u useragent
The options are:
-d dtdfile specifies the location of the E3Test.dtd file to use when writing test files to disk. This allows you to edit and context check the test file in Arbortext Publishing Engine Interactive. If this option is omitted, a DTD is not used when writing a test file to disk.
By default, this DTD file is located at PE_HOME/doctypes/e3test/e3test.dtd.
-f testfile specifies a file containing a list of tests. When this file is opened, Arbortext Publishing Engine 测试实用程序 displays the Test List dialog box.
-l logfile specifies either OUT to write the logging output to the terminal window or standard output (stdout) or the file to which logging output is written. If -l logfile is not specified, no logging output is produced.
-s server specifies the host name and port where the Arbortext PE Request Manager monitors HTTP requests. The parameter is in the form:
hostname:port/e3/servlet/e3
For example, http://myserver.mycompany.com:8200/e3/servlet/e3
If you do not specify a server, the server defaults to undefined, and you will receive an error if you try to run a test when no server is defined. However, you can specify a server within Arbortext Publishing Engine 测试实用程序 in the Server Configuration dialog box by choosing Server > Choose Server.
The server specification is replaced if you load a test file that contains a server specification.
-uuseragent specifies the default HTTP user-agent header that will be sent with your HTTP requests. For example, you could specify Mozilla/15.0 as the default user-agent.
You can override this default setting by specifying a user-agent within a specific test. If you do not specify a user-agent header within a test, Arbortext Publishing Engine 测试实用程序 uses the setting specified by -uuseragent. If you do not specify a user-agent here or in a test, a user-agent header is not generated.
When started from Arbortext Publishing Engine Interactive, the Arbortext Publishing Engine 测试实用程序 allows you to run applications in a simulated Arbortext Publishing Engine environment from within Arbortext Publishing Engine Interactive.
To start the Arbortext Publishing Engine 测试实用程序 in embedded mode:
1. Start Arbortext Publishing Engine Interactive by choosing it from its shortcut on your program group.
2. Choose Tools > Publishing Engine Test Utility. After it opens, you can click New Test or choose File > Open to select an existing test file.