testaro 62.0.1 → 62.0.3

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/UPGRADES.md CHANGED
@@ -3292,3 +3292,14 @@ All of the tests with elapsed times longer than 2 seconds were not yet refactore
3292
3292
  Credit for the speed improvement in refactored tests is apparently owed to the encapsulation of the entire test logic in a browser function, versus the repeated element-by-element execution of the same logic in Node.js with Playwright methods.
3293
3293
 
3294
3294
  Evidence for this hypothesis is provided by the change in elapsed time after refactoring of the `focOp` and `opFoc` tests. These two tests consumed 18 seconds before the refactoring. The refactoring combined them into a single `focAndOp` test with functionality equivalent to both original tests. The refactored test on the same target consumed 2 seconds, even though it reported and itemized 223 violations.
3295
+
3296
+ ## Speed improvement for nuVnu tool
3297
+
3298
+ The `nuVnu` tool has substantially longer elapsed times when performed on a virtual private server by Kilotest than when performed on a dedicated local host. Testing indicates that the difference is due largely to the overhead in the handling of the `vnu.check` method.
3299
+
3300
+ A conceptual outline of a possible shortcut (by GPT-5.2) is:
3301
+
3302
+ - spawn(javaPath, ['-jar', jarPath, '--format', 'json', '--stdout', pagePath], {stdio: ['ignore', outFd, 'pipe']})
3303
+ - collect stderr (or write it to a file too)
3304
+ - wait for close event
3305
+ - then read /tmp/out.json and parse it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "62.0.1",
3
+ "version": "62.0.3",
4
4
  "description": "Run 1000 web accessibility tests from 11 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -702,6 +702,6 @@ exports.standardize = act => {
702
702
  convert(which, data, result, standardResult);
703
703
  }
704
704
  else {
705
- console.log(`ERROR: Result of incomplete ${which || 'unknown'}act cannot be standardized`);
705
+ console.log(`ERROR: Result of incomplete ${which || 'unknown'} act cannot be standardized`);
706
706
  }
707
707
  };
package/tests/nuVnu.js CHANGED
@@ -49,27 +49,17 @@ exports.reporter = async (page, report, actIndex) => {
49
49
  }
50
50
  // If any error was thrown:
51
51
  catch (error) {
52
- let errorMessage = error.message;
53
- // If it was due to an incompatible Java version:
54
- if (errorMessage.includes('Unsupported major.minor version')) {
55
- // Revise the error message and report this.
56
- errorMessage = `Installed version of Java is incompatible. Details: ${errorMessage}`;
52
+ const errorMessage = error.message;
53
+ try {
54
+ // Parse it as JSON, i.e. a benign nuVnu result with at least 1 violation.
55
+ nuData = JSON.parse(error.message);
56
+ }
57
+ // If parsing it as JSON fails:
58
+ catch (error) {
59
+ // Report a genuine error.
57
60
  data.prevented = true;
58
61
  data.error = errorMessage;
59
62
  }
60
- // Otherwise, i.e. if it was not due to an incompatible Java version:
61
- else {
62
- try {
63
- // Treat the error message as a JSON result reporting rule violations.
64
- nuData = JSON.parse(error.message);
65
- }
66
- // But, if parsing it as JSON fails:
67
- catch (error) {
68
- // Report this.
69
- data.prevented = true;
70
- data.error = `Error getting result (${error.message.slice(0, 300)});`;
71
- }
72
- }
73
63
  }
74
64
  // Delete the temporary file.
75
65
  await fs.unlink(pagePath);