testronaut 1.0.3 → 1.0.5
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 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,8 +42,8 @@ Create a file in your missions/ directory, e.g. missions/login.mission.js:
|
|
|
42
42
|
import { runMissions } from 'testronaut';
|
|
43
43
|
|
|
44
44
|
export const loginMission = `
|
|
45
|
-
|
|
46
|
-
Fill in the username and password
|
|
45
|
+
Visit ${process.env.URL}.
|
|
46
|
+
Fill in the username field with ${process.env.USERNAME} and password field with ${process.env.PASSWORD}.
|
|
47
47
|
Submit the form.
|
|
48
48
|
Wait for the dashboard to appear.
|
|
49
49
|
Report SUCCESS if the dashboard is loaded, otherwise report FAILURE.
|
|
@@ -55,6 +55,16 @@ export async function executeMission() {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
```
|
|
58
|
+
|
|
59
|
+
Pass in credentials using an .env file. The .env file should also include your Open AI API key (permissions to the completions endpoint required):
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
OPENAI_API_KEY=sk-proj-############
|
|
63
|
+
URL=https://example.com/login
|
|
64
|
+
USERNAME=example@example.com
|
|
65
|
+
PASSWORD=********
|
|
66
|
+
```
|
|
67
|
+
|
|
58
68
|
You can chain multiple phases:
|
|
59
69
|
|
|
60
70
|
```
|