testilo 9.0.2 → 10.0.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.
Files changed (51) hide show
  1. package/README.md +31 -19
  2. package/package.json +1 -1
  3. package/procs/score/{sp20b.js → tic21.js} +1252 -991
  4. package/procs/score/tsp21.js +720 -0
  5. package/specs/batches/orgs.json +43 -0
  6. package/specs/scripts/ts21.json +212 -0
  7. package/toolRules/qualWeb.tsv +121 -0
  8. package/procs/score/sp10a.js +0 -591
  9. package/procs/score/sp10b.js +0 -507
  10. package/procs/score/sp10c.js +0 -465
  11. package/procs/score/sp11a.js +0 -1968
  12. package/procs/score/sp12a.js +0 -3000
  13. package/procs/score/sp12b.js +0 -3315
  14. package/procs/score/sp14a.js +0 -4101
  15. package/procs/score/sp15a.js +0 -4899
  16. package/procs/score/sp15b.js +0 -6279
  17. package/procs/score/sp15c.js +0 -6282
  18. package/procs/score/sp16a.js +0 -6362
  19. package/procs/score/sp16b.js +0 -6370
  20. package/procs/score/sp16c.js +0 -6364
  21. package/procs/score/sp17a.js +0 -6099
  22. package/procs/score/sp18a.js +0 -6378
  23. package/procs/score/sp20a.js +0 -6379
  24. package/procs/score/spHover.js +0 -328
  25. package/procs/score/tsp09a.js +0 -564
  26. package/scoring/data/correlations.json +0 -327
  27. package/scoring/data/data.json +0 -26021
  28. package/scoring/data/dupCounts.json +0 -112
  29. package/scoring/data/duplications.json +0 -253
  30. package/scoring/data/groups.json +0 -335
  31. package/scoring/data/issues.json +0 -304
  32. package/scoring/data/rulesetData.json +0 -15
  33. package/scoring/data/testGroups.json +0 -1067
  34. package/scoring/procs/asp09.js +0 -555
  35. package/scoring/procs/asp09NoWAVE.js +0 -508
  36. package/scoring/procs/correlation.js +0 -76
  37. package/scoring/procs/dupCounts.js +0 -39
  38. package/scoring/procs/groups.js +0 -61
  39. package/scoring/procs/packageData.js +0 -171
  40. package/scoring/procs/packageIssues.js +0 -34
  41. package/scoring/procs/regroup.js +0 -39
  42. package/scoring/procs/tempgroup.js +0 -96
  43. /package/procs/score/{spA11yMessage.js → tspA11yMessage.js} +0 -0
  44. /package/procs/score/{spProductPrice.js → tspProductPrice.js} +0 -0
  45. /package/{scoring/data/packageRules → toolRules}/alfa.tsv +0 -0
  46. /package/{scoring/data/packageRules → toolRules}/axe.js +0 -0
  47. /package/{scoring/data/packageRules → toolRules}/htmlcs.js +0 -0
  48. /package/{scoring/data/packageRules → toolRules}/ibm.tsv +0 -0
  49. /package/{scoring/data/packageRules → toolRules}/tenon.tsv +0 -0
  50. /package/{scoring/data/packageRules → toolRules}/wave.json +0 -0
  51. /package/{scoring/data/packageRules → toolRules}/wave.tsv +0 -0
package/README.md CHANGED
@@ -11,18 +11,6 @@ Testaro performs digital accessibility tests on web artifacts and creates report
11
11
 
12
12
  Because Testilo supports Testaro, this `README` file presumes that you have access to the Testaro `README` file and therefore does not repeat information provided there.
13
13
 
14
- ## Branches
15
-
16
- The `writer` branch contains the state of Testilo as of 2022-11-07. In that branch, Testilo must read and write files. That makes Testilo unusable as a dependency in applications that do not have permission to both read and write files.
17
-
18
- The `simple` branch contains the state of Testilo as of 2022-12-23. In that branch, Testilo does not need to read or write files, so applications without write permission can still use Testilo as a dependency.
19
-
20
- The `main` branch contains the state of Testilo from 2022-12-24 until now. In that branch, Testilo can prepare jobs that require multi-step operations to reach and pre-process the targets being tested.
21
-
22
- The `complexmerge` branch refactors `main` and is to be merged into `main` when the refactoring is complete.
23
-
24
- This `README.md` file documents the `complexmerge` branch and will document the `main` branch when `complexmerge` is merged into `main`.
25
-
26
14
  ## Dependencies
27
15
 
28
16
  The `dotenv` dependency lets you set environment variables in an untracked `.env` file. This prevents secret data, such as passwords, from being shared as part of this package.
@@ -110,7 +98,7 @@ Suppose you have created this script:
110
98
  }
111
99
  ```
112
100
 
113
- The `acts` array of this script contains tree regular acts and two placeholders.
101
+ The `acts` array of this script contains three acts of type `test` and two acts of type `placeholder`.
114
102
 
115
103
  #### Batch
116
104
 
@@ -277,7 +265,7 @@ A user can invoke `merge` in this way:
277
265
  - `node call merge s b e false`
278
266
  - `node call merge s b e`
279
267
 
280
- In these statements, replace `s` and `b` with the base names of the script and batch files, respectively. For example, if the script file is named `ts25.json`, then replace `x` with `ts25`. Replace `e` with an email address, or with an empty string if the environment variable `process.env.REQUESTER` exists and you want to use it.
268
+ In these statements, replace `s` and `b` with the base names of the script and batch files, respectively. For example, if the script file is named `ts25.json`, then replace `s` with `ts25`. Replace `e` with an email address, or with an empty string if the environment variable `process.env.REQUESTER` exists and you want to use it.
281
269
 
282
270
  The first statement will cause a merger with isolation.
283
271
  The second and third statements will cause a merger without isolation.
@@ -290,6 +278,16 @@ The `call` module will save the jobs in the `todo` subdirectory of the `process.
290
278
 
291
279
  To test the `merge` module, in the project directory you can execute the statement `node validation/merge/validate`. All logging statements should begin with “Success” and none should begin with “ERROR”.
292
280
 
281
+ ### Examples
282
+
283
+ There are script and batch examples in the `specs` directory.
284
+
285
+ The script example (with ID `ts21`) performs all of the tests available in Testaro, including the tests of 9 dependent tools. It contains 2 `placeholder` acts, one that specifies the Webkit browser for any `launch` act and one that specifies the Chromium browser for any `launch` act.
286
+
287
+ The batch example (with ID `orgs`) specifies 2 targets.
288
+ - One of them has the URL `https://example.com` and requires each placeholder to be replaced with 2 acts: a `launch` act and a `url` act.
289
+ - The other has the URL `https://www.w3.org/WAI/ARIA/apg/example-index/accordion/accordion` and requires each placeholder to be replaced with 3 acts: a `launch` act, a `url` act, and a `button` act.
290
+
293
291
  ## Report scoring
294
292
 
295
293
  ### Introduction
@@ -319,7 +317,7 @@ A scoring function defines scoring rules. The Testilo package contains a `procs/
319
317
 
320
318
  ### Invocation
321
319
 
322
- There are two ways to use the `score` module.
320
+ There are two ways to invoke the `score` module.
323
321
 
324
322
  #### By a module
325
323
 
@@ -338,13 +336,13 @@ The first argument to `score()` is a scoring function. In this example, it has b
338
336
  A user can invoke `score` in this way:
339
337
 
340
338
  ```bash
341
- node call score sp25a
342
- node call score sp25a 75
339
+ node call score tsp25a
340
+ node call score tsp25a 75
343
341
  ```
344
342
 
345
343
  When a user invokes `score` in this example, the `call` module:
346
- - gets the scoring module `sp25a` from its JSON file `sp25a.json` in the `score` subdirectory of the `process.env.FUNCTIONDIR` directory
347
- - gets the reports from the r`raw` subdirectory of the `process.env.REPORTDIR` directory
344
+ - gets the scoring module `tsp25a` from its JSON file `tsp25a.json` in the `score` subdirectory of the `process.env.FUNCTIONDIR` directory
345
+ - gets the reports from the `raw` subdirectory of the `process.env.REPORTDIR` directory
348
346
  - writes the scored reports to the `scored` subdirectory of the `process.env.REPORTDIR` directory
349
347
 
350
348
  The optional third argument to call (`75` in this example) is a report selector. Without the argument, `call` gets all the reports in the `raw` subdirectory. With the argument, `call` gets only those reports whose names begin with the argument string.
@@ -353,6 +351,20 @@ The optional third argument to call (`75` in this example) is a report selector.
353
351
 
354
352
  To test the `score` module, in the project directory you can execute the statement `node validation/score/validate`. All logging statements should begin with “Success” and none should begin with “ERROR”.
355
353
 
354
+ ### Comprehensive example
355
+
356
+ The module `procs/score/tsp21.js` is an example of a comprehensive score proc. It is designed to score reports produced by Testaro from jobs that Testilo creates from the `ts21` script. That script causes Testaro to perform 1351 tests belonging to Testaro and nine other tools integrated into Testaro as dependencies.
357
+
358
+ The `tsp21` score proc combines the results of those tests into a single score for each report. The `score` property that the proc adds to the report shows how the individual test results are aggregated into a score.
359
+
360
+ The `tsp21` score proc imports the `procs/score/tic21.js` module, which classifies all the tests into 255 “issues”. Any two or more tests classified into the same issue are deemed to be approximately equivalent in intent. Using this classification, the score proc tabulates the test results by issue, so that all instances of the issue, regardless of which tool discovered the instances, are reported together.
361
+
362
+ The issue classification in `tic21` assigns weights to the issues to reflect their estimated severities,and the scoring algorithm of `tsp21` adopts a compromise between issue-based and tool-based summation. Thus, if 3 tools discover 20 instances of an issue, the score increases (i.e. becomes worse) by more than it would if only 1 tool had discovered them, but less than 3 times as much. The motivations are that discovery of issue instances by multiple tools increases confidence that the issues are real, and passing accessibility tests is per se beneficial because it decreases risks associated with alleged inaccessibility.
363
+
364
+ The `tsp21` score proc does **not** attempt to identify instances of issues. Thus, if tool A discovers 4 instances and tool B discovers 7 instances of some issue, `tsp21` does not attempt to say which of the 4 discovered by A are a subset of the 7 discovered by B. Instead,`tsp21` naïvely acts as if the 4 are all a subset of the 7, even though in reality the two sets might be entirely disjoint.
365
+
366
+ In the `tsp21` scoring algorithm, the failure of a tool or of a Testaro test to run on a page increases the score of the page, and messages logged by the browser while tests are being performed on a page, especially error messages, also increase the score.
367
+
356
368
  ## Report digesting
357
369
 
358
370
  ### Introduction
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "9.0.2",
3
+ "version": "10.0.0",
4
4
  "description": "Client that scores and digests Testaro reports",
5
5
  "main": "aim.js",
6
6
  "scripts": {