testaro 54.0.0 → 54.0.2
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 +3 -3
- package/call.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -777,11 +777,11 @@ The arguments and behaviors described above for execution by a module apply here
|
|
|
777
777
|
|
|
778
778
|
### Network watching
|
|
779
779
|
|
|
780
|
-
Testaro can poll servers for jobs to be performed.
|
|
780
|
+
Testaro can poll servers for jobs to be performed. Such a server can act as the “controller” described in [How to run a thousand accessibility tests](https://medium.com/cvs-health-tech-blog/how-to-run-a-thousand-accessibility-tests-63692ad120c3). The server is responsible for preparing Testaro jobs, assigning them to Testaro agents, receiving reports back from those agents, and performing any further processing of the reports, including enhancement, storage, and disclosure to audiences. It can be any server reachable with a URL. That includes a server running on the same host as Testaro, with a URL such as `localhost:3000`.
|
|
781
781
|
|
|
782
782
|
Network watching is governed by environment variables of the form `NETWATCH_URL_0_JOB`, `NETWATCH_URL_0_OBSERVE`, `NETWATCH_URL_0_REPORT`, and `NETWATCH_URL_0_AUTH`, and by an environment variable `NETWATCH_URLS`.
|
|
783
783
|
|
|
784
|
-
You can create as many quadruples of `…JOB`, `OBSERVE`, `…REPORT`, and `AUTH` variables as you want, one quadruple for each server that the agent may get jobs from. Each quadruple has a different number inside the variable name. The `…JOB` variable is the URL that the agent needs to send a job request to. The `…OBSERVE` variable is the URL that the agent needs to send granular job progress messages to if the job requests that. The `…REPORT` variable is the URL that the agent needs to send a completed report to. The `…AUTH` variable is the password of the agent that will be recognized by the server. Each URL can contain segments and/or query parameters that identify the purpose of the request, the identity and authorization of the agent, etc.
|
|
784
|
+
You can create as many quadruples of `…JOB`, `OBSERVE`, `…REPORT`, and `AUTH` variables as you want, one quadruple for each server that the agent may get jobs from. Each quadruple has a different number inside the variable name. The `…JOB` variable is the URL that the agent needs to send a job request to (a typical URL could be `https://testcontroller.xyz.com/api/getJob/agent3`). The `…OBSERVE` variable is the URL that the agent needs to send granular job progress messages to if the job requests that. The `…REPORT` variable is the URL that the agent needs to send a completed report to (such as `localhost:3000/api/submitReport/agent3`). The `…AUTH` variable is the password of the agent that will be recognized by the server. Each URL can contain segments and/or query parameters that identify the purpose of the request, the identity and authorization of the agent, etc.
|
|
785
785
|
|
|
786
786
|
In each quadruple, the `…AUTH` variable is optional. If it is truthy (i.e. it exists and has a non-empty value), then the job request sent to the server will be a `POST` request and the payload will be an object with an `agentPW` property, whose value is the password. Otherwise, i.e. if the variable has an empty string as its value or does not exist, the request will be a `GET` request, and an agent password, if required by the server, will need to be provided in the URL.
|
|
787
787
|
|
|
@@ -815,7 +815,7 @@ const {netWatch} = require('testaro/netWatch');
|
|
|
815
815
|
netWatch(true, 300, true);
|
|
816
816
|
```
|
|
817
817
|
|
|
818
|
-
In this example, a module of your application asks Testaro to check the servers for a job every 300 seconds, to perform any jobs obtained from the servers, and then to continue checking until the process is stopped. If the first argument is `false`, Testaro will stop checking after performing 1 job.
|
|
818
|
+
In this example, a module of your application asks Testaro to check the servers for a job every 300 seconds, to perform any jobs obtained from any of the servers, and then to continue checking until the process is stopped. If the first argument is `false`, Testaro will stop checking after performing 1 job.
|
|
819
819
|
|
|
820
820
|
The third argument specifies whether Testaro should be certificate-tolerant. A `true` value makes Testaro accept SSL certificates that fail verification against a list of certificate authorities. This allows testing of `https` targets that, for example, use self-signed certificates. If the third argument is omitted, the default for that argument is implemented. The default is `true`.
|
|
821
821
|
|
package/call.js
CHANGED
|
@@ -70,7 +70,7 @@ const callRun = async jobIDStart => {
|
|
|
70
70
|
if (jobFileName) {
|
|
71
71
|
// Get it.
|
|
72
72
|
const jobJSON = await fs.readFile(`${todoDir}/${jobFileName}`, 'utf8');
|
|
73
|
-
|
|
73
|
+
let report = JSON.parse(jobJSON);
|
|
74
74
|
// Ensure it does not specify server properties.
|
|
75
75
|
report.observe = false;
|
|
76
76
|
// Run it.
|