Clean up naming and redo for change in architecture.

Comments

boombatower’s picture

Set of XML-RPC calls PIFR will provide.

  • pifr.queue($key, $batch) : $response - Queue a batch of files for testing. (Called by PIFT)
  • pifr.next($key) : $file - Request the next file for testing. (Called by PIFR client)
  • pifr.result($key, $file_id, $status, $message, $results) : $response - Report test results. (Called by PIFR client)

$response must be of type PIFR_RESPONSE_*.
$file structure as described in #360917: Update XML-RPC test request.

Set of XML-RPC calls PIFT will provide.

  • pift.result($key, $batch) : $response - Report aggregated test results. (Called by PIFR server)
boombatower’s picture

pifr.next($key) : $test

Empty array if no tests available.

$test = array(
  'test_id', // Unique test ID.
  'core' => array(
    'repository' => array(
      'type', // Textual representation of repository type.
      'url', // CVS will only require URL.
    ),
    'branch_identifier', // Branch identifier.
  ),
  'module' => array( // (Optional) If included then module will be tested.
    'repository' => array(
      'type', // Textual representation of repository type.
      'url', // CVS will only require URL.
    ),
    'branch_identifier', // Branch identifier.
  ),
  'file_url', // (Optional) If included then file will be downloaded and applied to code.
);

Error:

$test = array(
  'response' // Response code: PIFR_RESPONSE_*
);
boombatower’s picture

Status: Active » Needs review

Completed pifr.queue() and pifr.next().

boombatower’s picture

pifr.result($key, $result):

$result = array(
  'test_id',
  'code',
  'details',
  'summary' => array(
    'pass',
    'fail',
    'exception'
  ),
  'result_details' => array(
    array(
      'test_name',
      'pass',
      'fail',
      'exception',
      'assertions' => array(
        'status',
        'message',
        'message_group',
        'function',
        'line',
        'file',
      ),
    ),
  ),
);
boombatower’s picture

Implemented pifr.result()

$result = array(
  'test_id', // Unique test ID.
  'code', // Summary result code, PIFR_SERVER_TEST_RESULT_*.
  'details', // Array of details (parameters for t()).
  'pass', // Total number of pass assertions.
  'fail', // Total number of fail assertions.
  'exception', // Total number of exception assertions.
  'result_details' => array( /* [summary of test and non-pass assertions] */ ),
);

$result_detail = array(
  'test_name', // Name of test.
  'pass', // Total number of pass assertions.
  'fail', // Total number of fail assertions.
  'exception', // Total number of exception assertions.
  'assertions' => array( /* [non-pass assertions] */ ),
);

$assertion = array(
  'status', // Assertion status: 'fail' or 'exception'.
  'message', // Descriptive assertion message.
  'message_group', // Message group.
  'function', // Function in which the assertion was triggered.
  'line', // Line at which the assertion was triggered.
  'file', // File in which the assertion was triggered.
);
boombatower’s picture

Need a method for retrieving results.

pifr.retrieve()

boombatower’s picture

Updating pifr.queue():

$batch = array(
  'branches' => array( [referenced branches (may also be tested)] ),
  'files' => array( [files to be tested] ),
  'projects' => array( [referenced projects] ),
);

$branch = array(
  'branch_nid', // Release NID.
  'project_nid', // Project NID.
  'core_branch_nid', // Compatible core branch release NID.
  'identifier', // Repository branch identifier.
  'test', // Request branch to be tested.
  'test_id', // Unique ID representing the test.
);

$file = array(
  'branch_nid', // Branch release NID.
  'file_url', // Complete URL to file.
  'issue_nid', // Issue NID.
  'issue_cid', // Issue CID.
  'test_id', // Unique ID representing the test.
);

$project = array(
  'project_nid', // Project NID.
  'name', // Short project name.
  'type', // Project type, PIFR_SERVER_PROJECT_TYPE_*.
  'repository_type', // Repository type (currently only CVS).
  'repository_url', // Repository URL, pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal.
);
boombatower’s picture

pifr.retreive($since) : $response

$batch = array(
  'results' => array( /* [results of tests] */ ),
  'is_more', // More results are available, query again.
);

$result = array(
  'test_id', // Unique ID representing the test.
  'status', // Pass, or fail.
  'message', // Message describing results of test.
  'link', // Link to more detailed results.
);
boombatower’s picture

pifr.retrieve($since) is complete.

pifr.queue() needs some work. The main testing server should assign the test_id's not the project servers. Similar to an auto-increment field in database, the data is sent to be saved and the ids are returned.

boombatower’s picture

pifr.queue() response will contain the assigned test IDs.

$response = array(
  'batches' => array( /* [Test IDs of batches in order of increasing branch NID] */ ),
  'files' => array( /* [Test IDs of files in order ascending order by filename] */ ),
);
boombatower’s picture

Status: Needs review » Fixed

Finally completed! All XML-RPC calls are beautiful.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.