Report server
- ../report Visualising assertion results
Viewing flow execution reports by browsing the filesystem is convenient, but you miss out on the functionality that requires AJAX calls, e.g.:
- The model diff tool
- The basis diff view on the detail pages
- The system diagram on the index
Duct is a standalone executable that sits in the system tray and runs an HTTP server to which execution reports can be added. It will keep running as along as someone is viewing the index or a served report, and then shut down after 90 seconds of non-use.
After importing the bom
:
<dependency>
<!-- local report server -->
<groupId>com.mastercard.test.flow</groupId>
<artifactId>duct</artifactId>
<scope>test</scope>
</dependency>
When running your test, set system property mctf.report.serve=true
to have reports (if any are produced) viewed via a duct instance rather than the filesystem.
Right-click the system tray icon to:
Index
- View duct's index page. Served reports will be listed hereAdd...
- Choose a directory in which to search (recursively). All reports found will be added to the index and opened in the browserClear
- Removes all served reportsLogs
- Opens the directory where duct's log file is writtenExit
- Shut duct down.
Duct's server runs at port 2276
, and offers the following endpoints:
/heartbeat
- Send aGET
request to extend duct's lifespan by 90 seconds/add
- Send aPOST
request where the request body is the absolute path of an execution report. The report will be added to the index and the response body will contain the path underhttp://127.0.0.1:2276
to browse it/list
- Send aGET
request to retrieve a JSON summary of served reports/shutdown
- Send aPOST
request to shut duct down.
Duct is only accessible on loopback addresses, i.e.: http://127.0.0.1:2276
, http://localhost:2276
and http://[::1]:2276
.