With service stub logging, you can monitor the interactions
between an application and the stub server. When the option is enabled,
one log file is created for each deployed stub. The log files are
presented as a formatted HTML report.
Before you begin
You must have created one or several service stubs.
Procedure
To log service stub activity:
- Add the following virtual machine (VM) argument to the eclipse.ini file: -DSTUB_LOG_LEVEL=log_level.
Use one of the following values for the
log_level variable:
- 0: Disable the log.
- 1: Log stub activity without details.
- 2: Log stub activity including content
of sent and received messages.
- 3: Same as level 2 with HTTP headers of
received messages.
- 4: Same as level 3 with attached files.
You can also add the following optional arguments:
- -DSTUB_LOG_KEEP_PREVIOUS=true: This option creates
a separate log file each time the service stub is redeployed. If the
value is not true or if the option is not present,
the log file is erased if the service stub is redeployed or when the
stub server is stopped.
- -DSTUB_LOG_SERIALIZE_XML=true: This option displays
the XML content (with log levels 2, 3, and 4) without formatting or
indentation. If the value is not true or if the option
is not present, the XML content is formatted and indented in the log.
The eclipse.ini file is located in
the same directory as the eclipse.exe launcher
binary file that is used to run the product.
For
example, to enable logging with basic content, add the following line
to the end of the eclipse.ini file: -DSTUB_LOG_LEVEL=2.
- Restart the workbench, and in the Stub Monitor window, click the Run icon
to restart the stub servers.
- If the server was launched by a schedule in the performance
testing application, then corresponding logs are automatically created
in the workspace. If not, complete the following steps to retrieve
the log files from the stub server:
Important: The stub server must be running.
- After running your tests, to view the service stub log
files, open the Stub Monitor, and click the tab
for the stub server.
- Click the Synchronize toolbar
button for the selected server. An HTML log file
is created and displayed for each deployed service stub.
The stub log reports are located in a folder named stubLogs, which is in the same folder as the corresponding
service stub.