The Transaction Log page of the virtual service editor displays information on incoming requests and outgoing responses that happened during the current service run. Here is a sample view of the page:
The page contains information on all the requests that were sent to the virtual service, including the requests for which this service does not have a virtual operation.
To view contents of a request or response, select this request or response on the page. The request (or response) data – body contents, headers and other – will be on the right (see the image above).
The page marks successfully processed requests with green dots, and failed requests with red dots. Note that even if the virtual service responds with an error code, the entire transaction can be marked as successful, because an error code could be a normal response to an invalid request.
Virtual services treat transactions as successful or failed depending on the assertion results. To find out what assertion failed:
Select the request (the assertions check incoming requests). Information on the request will be displayed on the right.
Expand the Assertions section and find the failed assertion there. The section will also mention the reason of the fail:
To find a record on the list quickly, type any part of its contents in the Filter edit box. The panel applies the filter and displays matching items on-the-fly:
You can type any part of the displayed item: request header details, response code, log timestamp, and so on.
As we said above, the log stores information on transactions that happened during the current run. By default, the page displays 25 last transactions. This number is specified by the Transaction logs to keep setting. To access it quickly, click on the Transaction Log toolbar. Alternatively, you can get to the option through the Preferences > Virtual Service Transactions dialog.
Note that storing a large amount of log data will consume lots of memory. So, we do not recommend using high values for this setting. Keep it as low as possible for your tests.
To clear the log data manually, click Clear transaction log on the log toolbar.
You can find the total number or received requests and sent responses in the toolbar of the virtual service editor, or in the property editor on the right:
To disable logging, click Pause continuous updates in the log toolbar. The toolbar item will change to Resume continuous updates. Click this button to enable logging: