XML report delivery mechanism

Registered by John H. Embretsen on 2010-03-04

Add a mechanism to the RQG for delivering XML reports to a given destination. Useful for reporting test results into centralized locations by using XML files.

Blueprint information

Status:
Complete
Approver:
None
Priority:
High
Drafter:
John H. Embretsen
Direction:
Approved
Assignee:
John H. Embretsen
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
John H. Embretsen on 2010-03-09
Completed by
John H. Embretsen on 2011-04-19

Sprints

Whiteboard

The plan is to start with something relatively simple and possibly extend as we go.

Current requirement for Sun-internal testing is scp delivery to a specified location, however this may change.
Some alternatives at this time are HTTP POST and/or MySQL database entry and/or anonymous ftp. We may need support for more than one mechanism for different purposes.

Currently, XML reporting is enabled by specifying the option:
--xml-output=/path/to/file

This blueprint proposes to keep this, but also to add some option specifying
 a) If additional report delivery is needed
 b) How to perform this delivery

Suggestion: Add the following new options, for starters:

--testname
    Test name (may be added as part of other blueprint (test definitions)).
    Default: "NO_NAME", or grammar file name?
--report-xml-tt
    Toggle XML report delivery to Test Tool (tt), an internal Sun database.
    Default: false. If set, will try to copy XML report to destination.
--report-xml-tt-type=<type>
    Specifies delivery mechanism to use if --report-xml-tt is set.
    Default: XMLTRANSPORT_TYPE_SCP
--report-xml-tt-dest=<url>
    Specifies destination for XML report delivery.
    Default: <email address hidden>:/raid/xml_results/TestTool/xml/

If set, will copy XML output to destination using <type> mechanism.

File name is determined by:

 --xml-output if set
   - a copy of the report will remain in the location determined by xml-output.

If --xml-output is not set, filename will be generated based on
  --testname=<testname> option (NEW)
 and
  current ISO (or ISO-like?) timestamp when the report is written/sent.
  A local copy of the report will not be kept.

Example_1:

 (...) --report-xml-tt --testname=rqg_info_schema

 results in the following system command being executed:

 scp rqg_info_schema_20100304T152100.xml <email address hidden>:/raid/xml_results/TestTool/xml/

Example_2:

 (...) --xml-output=/my/path/to/myreport.xml \
 --report-xml-tt \
 --report-xml-tt-type=mysql \
 --report-xml-tt-dest=dbi:mysql:host=db-report-host:port=3306:user=xmldrop:password=test;database=test

 results in the contents of the generated file /my/path/to/myreport.xml being sent by MySQL client
 connection to the server defined in the dsn specified.

Will start out by implementing support for generic internal reporting, currently scp to the above mentioned
location.

UPDATE 2011-04-19 (johnemb):

Branch lp:~johnemb/randgen/xml-report was merged into lp:randgen on 2010-04-08. Basic XML delivery is available in randgen trunk, with SCP as the (for now) only supported delivery mechanism. This implementation has been used "in production" with success for some time now.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.