testilo 16.0.7 → 16.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/call.js +9 -7
- package/package.json +1 -1
- package/procs/score/tic33.js +5 -0
- package/procs/score/tic34.js +7538 -0
- package/procs/score/tsp33.js +64 -26
- package/scripts/ts33.json +56 -0
- package/scripts/ts34.json +77 -0
package/README.md
CHANGED
|
@@ -27,6 +27,18 @@ Testilo can be installed wherever Node.js (version 14 or later) is installed. Th
|
|
|
27
27
|
|
|
28
28
|
The reason for Testilo being an independent package, rather than part of Testaro, is that Testilo can be installed on any host, while Testaro can run successfully only on a Windows or Macintosh workstation (and perhaps on some workstations with Ubuntu operating systems). Testaro runs tests similar to those that a human accessibility tester would run, using whatever browsers, input devices, system settings, simulated and attached devices, and assistive technologies tests may require. Thus, Testaro is limited to functionalities that require workstation attributes. For maximum flexibility in the management of Testaro jobs, all other functionalities are located outside of Testaro. You could have software such as Testilo running on a server, communicating with multiple workstations running Testaro. The workstations could receive job orders from the server and return job results to the server for further processing.
|
|
29
29
|
|
|
30
|
+
## Configuration
|
|
31
|
+
|
|
32
|
+
Environment variables for Testilo can be specified in a `.env` file. An example:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
FUNCTIONDIR=../testdir/procs
|
|
36
|
+
JOBDIR=../testdir/jobs
|
|
37
|
+
REPORTDIR=../testdir/reports
|
|
38
|
+
REQUESTER=a11ymgr@a11yorg.com
|
|
39
|
+
SPECDIR=../testdir/specs
|
|
40
|
+
```
|
|
41
|
+
|
|
30
42
|
## Job preparation
|
|
31
43
|
|
|
32
44
|
### Introduction
|
package/call.js
CHANGED
|
@@ -66,11 +66,11 @@ const callScript = async (scriptID, classificationID = null, ... issueIDs) => {
|
|
|
66
66
|
const scriptObj = script(scriptID, issues, ... issueIDs);
|
|
67
67
|
// Save the script.
|
|
68
68
|
const scriptJSON = JSON.stringify(scriptObj, null, 2);
|
|
69
|
-
await fs.writeFile(`${specDir}/scripts/${scriptID}.json`, scriptJSON);
|
|
69
|
+
await fs.writeFile(`${specDir}/scripts/${scriptID}.json`, `${scriptJSON}\n`);
|
|
70
70
|
console.log(`Script ${scriptID} created and saved in ${specDir}/scripts`);
|
|
71
71
|
};
|
|
72
72
|
// Fulfills a merging request.
|
|
73
|
-
const callMerge = async (scriptID, batchID, requester, withIsolation, todo
|
|
73
|
+
const callMerge = async (scriptID, batchID, requester, withIsolation, todo) => {
|
|
74
74
|
// Get the script and the batch.
|
|
75
75
|
const scriptJSON = await fs.readFile(`${specDir}/scripts/${scriptID}.json`, 'utf8');
|
|
76
76
|
const script = JSON.parse(scriptJSON);
|
|
@@ -79,10 +79,10 @@ const callMerge = async (scriptID, batchID, requester, withIsolation, todo = tru
|
|
|
79
79
|
// Merge them into an array of jobs.
|
|
80
80
|
const jobs = merge(script, batch, requester, withIsolation);
|
|
81
81
|
// Save the jobs.
|
|
82
|
+
const destination = todo === 'true' ? 'todo' : 'pending';
|
|
82
83
|
for (const job of jobs) {
|
|
83
84
|
const jobJSON = JSON.stringify(job, null, 2);
|
|
84
|
-
|
|
85
|
-
await fs.writeFile(`${jobDir}/${destination}/${job.id}.json`, jobJSON);
|
|
85
|
+
await fs.writeFile(`${jobDir}/${destination}/${job.id}.json`, `${jobJSON}\n`);
|
|
86
86
|
}
|
|
87
87
|
const {timeStamp} = jobs[0];
|
|
88
88
|
console.log(
|
|
@@ -102,7 +102,7 @@ const callSeries = async (idStart, count, interval) => {
|
|
|
102
102
|
const jobSeries = series(job, Number.parseInt(count), Number.parseInt(interval));
|
|
103
103
|
// Save the jobs.
|
|
104
104
|
for (const item of jobSeries) {
|
|
105
|
-
await fs.writeFile(`${jobDir}/todo/${item.id}.json`, JSON.stringify(item, null, 2));
|
|
105
|
+
await fs.writeFile(`${jobDir}/todo/${item.id}.json`, `${JSON.stringify(item, null, 2)}\n`);
|
|
106
106
|
}
|
|
107
107
|
console.log(`Series of ${jobSeries.length} jobs generated and saved in ${jobDir}/todo`);
|
|
108
108
|
}
|
|
@@ -141,7 +141,9 @@ const callScore = async (scorerID, selector = '') => {
|
|
|
141
141
|
// For each scored report:
|
|
142
142
|
for (const report of reports) {
|
|
143
143
|
// Save it.
|
|
144
|
-
await fs.writeFile(
|
|
144
|
+
await fs.writeFile(
|
|
145
|
+
`${scoredReportDir}/${report.id}.json`, `${JSON.stringify(report, null, 2)}\n`
|
|
146
|
+
);
|
|
145
147
|
};
|
|
146
148
|
console.log(`Reports scored and saved in ${scoredReportDir}`);
|
|
147
149
|
}
|
|
@@ -235,7 +237,7 @@ else if (fn === 'script' && fnArgs.length) {
|
|
|
235
237
|
console.log('Execution completed');
|
|
236
238
|
});
|
|
237
239
|
}
|
|
238
|
-
else if (fn === 'merge' && fnArgs.length
|
|
240
|
+
else if (fn === 'merge' && fnArgs.length === 5) {
|
|
239
241
|
callMerge(... fnArgs)
|
|
240
242
|
.then(() => {
|
|
241
243
|
console.log('Execution completed');
|
package/package.json
CHANGED
package/procs/score/tic33.js
CHANGED
|
@@ -7283,6 +7283,11 @@ exports.issues = {
|
|
|
7283
7283
|
quality: 1,
|
|
7284
7284
|
what: 'Left angle bracket is followed by a question mark'
|
|
7285
7285
|
},
|
|
7286
|
+
'^Bad character . after <. Probable cause: Unescaped <. Try escaping it as <.*$': {
|
|
7287
|
+
variable: true,
|
|
7288
|
+
quality: 1,
|
|
7289
|
+
what: 'Left angle bracket is followed by an invalid character'
|
|
7290
|
+
},
|
|
7286
7291
|
'Almost standards mode doctype. Expected <!DOCTYPE html>.': {
|
|
7287
7292
|
variable: false,
|
|
7288
7293
|
quality: 1,
|