Skip to content

Architectural enhancements (teamengine v5)

rjmartell edited this page Sep 29, 2015 · 18 revisions

This enhancement proposal suggests an architecture refactoring and the adoption of a standard test reporting language.

A. Separate report presentation from test execution

Split the current web application into two components:

  • a Manager that
  • manages makes call to a Test Execution Service
  • manages the users logs (database)
  • invokes a reporter service
  • a "Reporter service" that
    • parses the EARL report and creates and presents human-readable reports (e.g. HTML5, PDF) to end users or XML/RDF to clients
  • a "Test Execution Service" (TES) that provides a RESTful API for invoking (and managing) test suites

The validator would use the TES, of course, but other software agents (including mobile clients) could do the same.

B. Adopt a standard test results language

I recommend adopting the W3C Evaluation and Report Language (EARL) 1.0 Schema, an RDF vocabulary for describing test results:

The existing working draft hasn't been updated in a while, but it looks like the Evaluation and Repair Tools Working Group (ERT WG) is seeking to renew its charter. Note that advancing EARL to Recommendation status is one of its goals. The OGC could be an early adopter ;-)

Most test runners have their own custom result formats (usually based on XML), so it would be necessary to transform these to EARL test results (RDF/XML syntax). For example, using TestNG one could implement a custom listener or reporter to do this. The Validator front-end would then take these raw test results and produce something easy on the eyes for human readers :-)

The essential structure of the response message from the TES is shown below, where the enclosed entity is an RDF/XML representation of the test results.

HTTP/1.1 200 OK
Content-Type: application/rdf+xml
Content-Length: NNNNN

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:earl="http://www.w3.org/ns/earl#"
         xmlns:http="http://www.w3.org/2011/http#
         xmlns:ptr="http://www.w3.org/2009/pointers#"      
         xmlns:dct="http://purl.org/dc/terms/">

    <!-- EARL statements -->

</rd:RDF>