Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

(proposed) Quail API

J. Renée Beach edited this page Mar 25, 2014 · 4 revisions

Purpose of this rearchitecting: Allow the results of a Quail test run to be queried by varied constraints: by specific Test, by Technique or by Guideline Section

API

Invocation

Quail.settings({
  routes: {
    tests: 'some/path/',
    guidelines: 'some/path'
  }
});

var wcagGuideline = new Quail.buildGuideline('wcag', {
  'conformanceLevel': 'a'
});

wcagGuideline.evaluate();

var stats = wcagGuideline.getResultStats();
// output:
// stats.total
// stats.passed 
// stats.failed
// stats.cantTel
// stats.notTested
// stats.cannotTell

Guideline

// Runs the tests associated with the guideline
//
evaluate: function () {}

// A backwards-compatibility iterator that simply runs a callback on each test
// in the Guideline
eachTest: function (function callback (Test test) {}) {}

// Returns rolled-up results, rolled up, by categories:
// Pass, Fail, notApplicable, notTested, CannotTell
getResultStats: function () {}

getResultsBySuccessCriteria: function ('successCriteriaName') {}

getResultsByTechnique: function ('techniqueName') {}

getResultsByTest: function ('testName') {}