testdriverai 7.5.8 → 7.5.10
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/CHANGELOG.md +14 -0
- package/agent/lib/sandbox.js +24 -0
- package/package.json +1 -1
- package/.github/agents/testdriver.agent.md +0 -641
- package/.github/copilot-instructions.md +0 -690
- package/.github/skills/testdriver-ai/SKILL.md +0 -204
- package/.github/skills/testdriver-assert/SKILL.md +0 -315
- package/.github/skills/testdriver-aws-setup/SKILL.md +0 -448
- package/.github/skills/testdriver-caching/SKILL.md +0 -124
- package/.github/skills/testdriver-captcha/SKILL.md +0 -159
- package/.github/skills/testdriver-ci-cd/SKILL.md +0 -602
- package/.github/skills/testdriver-click/SKILL.md +0 -286
- package/.github/skills/testdriver-client/SKILL.md +0 -372
- package/.github/skills/testdriver-cloud/SKILL.md +0 -119
- package/.github/skills/testdriver-customizing-devices/SKILL.md +0 -153
- package/.github/skills/testdriver-dashcam/SKILL.md +0 -418
- package/.github/skills/testdriver-debugging-with-screenshots/SKILL.md +0 -401
- package/.github/skills/testdriver-device-config/SKILL.md +0 -317
- package/.github/skills/testdriver-double-click/SKILL.md +0 -102
- package/.github/skills/testdriver-elements/SKILL.md +0 -605
- package/.github/skills/testdriver-enterprise/SKILL.md +0 -114
- package/.github/skills/testdriver-examples/SKILL.md +0 -7
- package/.github/skills/testdriver-exec/SKILL.md +0 -345
- package/.github/skills/testdriver-find/SKILL.md +0 -829
- package/.github/skills/testdriver-focus-application/SKILL.md +0 -293
- package/.github/skills/testdriver-generating-tests/SKILL.md +0 -36
- package/.github/skills/testdriver-hover/SKILL.md +0 -278
- package/.github/skills/testdriver-locating-elements/SKILL.md +0 -71
- package/.github/skills/testdriver-making-assertions/SKILL.md +0 -32
- package/.github/skills/testdriver-mcp-workflow/SKILL.md +0 -410
- package/.github/skills/testdriver-mouse-down/SKILL.md +0 -161
- package/.github/skills/testdriver-mouse-up/SKILL.md +0 -164
- package/.github/skills/testdriver-parse/SKILL.md +0 -236
- package/.github/skills/testdriver-performing-actions/SKILL.md +0 -54
- package/.github/skills/testdriver-press-keys/SKILL.md +0 -348
- package/.github/skills/testdriver-quickstart/SKILL.md +0 -145
- package/.github/skills/testdriver-reusable-code/SKILL.md +0 -249
- package/.github/skills/testdriver-right-click/SKILL.md +0 -123
- package/.github/skills/testdriver-running-tests/SKILL.md +0 -185
- package/.github/skills/testdriver-screenshot/SKILL.md +0 -248
- package/.github/skills/testdriver-scroll/SKILL.md +0 -335
- package/.github/skills/testdriver-secrets/SKILL.md +0 -115
- package/.github/skills/testdriver-self-hosted/SKILL.md +0 -65
- package/.github/skills/testdriver-test-writer/SKILL.md +0 -451
- package/.github/skills/testdriver-testdriver/SKILL.md +0 -631
- package/.github/skills/testdriver-testdriver-mechanic/SKILL.md +0 -165
- package/.github/skills/testdriver-type/SKILL.md +0 -357
- package/.github/skills/testdriver-variables/SKILL.md +0 -111
- package/.github/skills/testdriver-waiting-for-elements/SKILL.md +0 -88
- package/.github/skills/testdriver-what-is-testdriver/SKILL.md +0 -54
- package/.github/workflows/acceptance-linux-scheduled.yaml +0 -45
- package/.github/workflows/acceptance-windows-scheduled.yaml +0 -59
- package/.github/workflows/acceptance.yaml +0 -108
- package/.github/workflows/publish.yaml +0 -75
- package/.github/workflows/test-init.yml +0 -157
- package/.github/workflows/testdriver.yml +0 -170
- package/.github/workflows/update-examples.yaml +0 -53
- package/.github/workflows/windows-self-hosted.yaml +0 -80
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
name: TestDriver.ai Tests
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main, master]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main, master]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
test:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
permissions:
|
|
14
|
-
contents: read
|
|
15
|
-
pull-requests: write # Required to post comments on PRs
|
|
16
|
-
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
|
|
20
|
-
- name: Setup Node.js
|
|
21
|
-
uses: actions/setup-node@v4
|
|
22
|
-
with:
|
|
23
|
-
node-version: "20"
|
|
24
|
-
cache: "npm"
|
|
25
|
-
|
|
26
|
-
- name: Install dependencies
|
|
27
|
-
run: npm ci
|
|
28
|
-
|
|
29
|
-
- name: Run TestDriver.ai tests
|
|
30
|
-
env:
|
|
31
|
-
TD_API_KEY: ${{ secrets.TD_API_KEY }}
|
|
32
|
-
TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
|
|
33
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
34
|
-
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
35
|
-
run: vitest run
|
|
36
|
-
|
|
37
|
-
- name: Upload test results
|
|
38
|
-
if: always()
|
|
39
|
-
uses: actions/upload-artifact@v4
|
|
40
|
-
with:
|
|
41
|
-
name: test-results
|
|
42
|
-
path: test-results/
|
|
43
|
-
retention-days: 30
|
|
44
|
-
|
|
45
|
-
# Init command test - only runs on PRs, not on main/master
|
|
46
|
-
- name: Create test directory for init
|
|
47
|
-
if: github.event_name == 'pull_request'
|
|
48
|
-
run: |
|
|
49
|
-
mkdir -p /tmp/test-init-project
|
|
50
|
-
cd /tmp/test-init-project
|
|
51
|
-
|
|
52
|
-
- name: Run init command (skip prompts)
|
|
53
|
-
if: github.event_name == 'pull_request'
|
|
54
|
-
working-directory: /tmp/test-init-project
|
|
55
|
-
run: |
|
|
56
|
-
# Create .env with API key first to skip the prompt
|
|
57
|
-
echo "TD_API_KEY=${{ secrets.TD_API_KEY }}" > .env
|
|
58
|
-
|
|
59
|
-
# Run init command using the CLI from the repo
|
|
60
|
-
node ${{ github.workspace }}/bin/testdriverai.js init
|
|
61
|
-
env:
|
|
62
|
-
TD_API_KEY: ${{ secrets.TD_API_KEY }}
|
|
63
|
-
|
|
64
|
-
- name: Verify project structure
|
|
65
|
-
if: github.event_name == 'pull_request'
|
|
66
|
-
working-directory: /tmp/test-init-project
|
|
67
|
-
run: |
|
|
68
|
-
echo "Checking generated files..."
|
|
69
|
-
|
|
70
|
-
# Check for package.json
|
|
71
|
-
if [ ! -f "package.json" ]; then
|
|
72
|
-
echo "❌ package.json not found"
|
|
73
|
-
exit 1
|
|
74
|
-
fi
|
|
75
|
-
echo "✓ package.json exists"
|
|
76
|
-
|
|
77
|
-
# Check for vitest config
|
|
78
|
-
if [ ! -f "vitest.config.js" ]; then
|
|
79
|
-
echo "❌ vitest.config.js not found"
|
|
80
|
-
exit 1
|
|
81
|
-
fi
|
|
82
|
-
echo "✓ vitest.config.js exists"
|
|
83
|
-
|
|
84
|
-
# Check for test file
|
|
85
|
-
if [ ! -f "tests/example.test.js" ]; then
|
|
86
|
-
echo "❌ tests/example.test.js not found"
|
|
87
|
-
exit 1
|
|
88
|
-
fi
|
|
89
|
-
echo "✓ tests/example.test.js exists"
|
|
90
|
-
|
|
91
|
-
# Check for .env file
|
|
92
|
-
if [ ! -f ".env" ]; then
|
|
93
|
-
echo "❌ .env not found"
|
|
94
|
-
exit 1
|
|
95
|
-
fi
|
|
96
|
-
echo "✓ .env exists"
|
|
97
|
-
|
|
98
|
-
# Check for .gitignore
|
|
99
|
-
if [ ! -f ".gitignore" ]; then
|
|
100
|
-
echo "❌ .gitignore not found"
|
|
101
|
-
exit 1
|
|
102
|
-
fi
|
|
103
|
-
echo "✓ .gitignore exists"
|
|
104
|
-
|
|
105
|
-
# Check for GitHub workflow
|
|
106
|
-
if [ ! -f ".github/workflows/testdriver.yml" ]; then
|
|
107
|
-
echo "❌ .github/workflows/testdriver.yml not found"
|
|
108
|
-
exit 1
|
|
109
|
-
fi
|
|
110
|
-
echo "✓ .github/workflows/testdriver.yml exists"
|
|
111
|
-
|
|
112
|
-
- name: Verify vitest config contents
|
|
113
|
-
if: github.event_name == 'pull_request'
|
|
114
|
-
working-directory: /tmp/test-init-project
|
|
115
|
-
run: |
|
|
116
|
-
echo "Checking vitest.config.js contents..."
|
|
117
|
-
|
|
118
|
-
# Check for TestDriver reporter
|
|
119
|
-
if ! grep -q "TestDriver()" vitest.config.js; then
|
|
120
|
-
echo "❌ TestDriver reporter not found in vitest.config.js"
|
|
121
|
-
cat vitest.config.js
|
|
122
|
-
exit 1
|
|
123
|
-
fi
|
|
124
|
-
echo "✓ TestDriver reporter is configured"
|
|
125
|
-
|
|
126
|
-
# Check for setupFiles
|
|
127
|
-
if ! grep -q "setupFiles.*testdriverai/vitest/setup" vitest.config.js; then
|
|
128
|
-
echo "❌ setupFiles not configured correctly"
|
|
129
|
-
cat vitest.config.js
|
|
130
|
-
exit 1
|
|
131
|
-
fi
|
|
132
|
-
echo "✓ setupFiles is configured"
|
|
133
|
-
|
|
134
|
-
- name: Verify test file contents
|
|
135
|
-
if: github.event_name == 'pull_request'
|
|
136
|
-
working-directory: /tmp/test-init-project
|
|
137
|
-
run: |
|
|
138
|
-
echo "Checking test file contents..."
|
|
139
|
-
|
|
140
|
-
# Check for .provision usage
|
|
141
|
-
if ! grep -q "\.provision\.chrome" tests/example.test.js; then
|
|
142
|
-
echo "❌ Test does not use .provision.chrome"
|
|
143
|
-
cat tests/example.test.js
|
|
144
|
-
exit 1
|
|
145
|
-
fi
|
|
146
|
-
echo "✓ Test uses .provision.chrome"
|
|
147
|
-
|
|
148
|
-
# Check for TestDriver import
|
|
149
|
-
if ! grep -q "from 'testdriverai/vitest/hooks'" tests/example.test.js; then
|
|
150
|
-
echo "❌ Test does not import from testdriverai/vitest/hooks"
|
|
151
|
-
cat tests/example.test.js
|
|
152
|
-
exit 1
|
|
153
|
-
fi
|
|
154
|
-
echo "✓ Test imports TestDriver from vitest/hooks"
|
|
155
|
-
|
|
156
|
-
- name: Run the generated test
|
|
157
|
-
if: github.event_name == 'pull_request'
|
|
158
|
-
working-directory: /tmp/test-init-project
|
|
159
|
-
run: npm test
|
|
160
|
-
env:
|
|
161
|
-
TD_API_KEY: ${{ secrets.TD_API_KEY }}
|
|
162
|
-
|
|
163
|
-
- name: Upload init test results
|
|
164
|
-
if: always() && github.event_name == 'pull_request'
|
|
165
|
-
uses: actions/upload-artifact@v4
|
|
166
|
-
with:
|
|
167
|
-
name: test-init-results
|
|
168
|
-
path: /tmp/test-init-project/test-results/
|
|
169
|
-
retention-days: 7
|
|
170
|
-
if-no-files-found: warn
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
name: Update Example Docs
|
|
2
|
-
permissions:
|
|
3
|
-
contents: write
|
|
4
|
-
on:
|
|
5
|
-
schedule:
|
|
6
|
-
- cron: "0 0 * * *" # Daily at midnight UTC
|
|
7
|
-
workflow_dispatch: # Allow manual trigger
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
update-examples:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
with:
|
|
16
|
-
fetch-depth: 0
|
|
17
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
18
|
-
|
|
19
|
-
- name: Setup Node.js
|
|
20
|
-
uses: actions/setup-node@v4
|
|
21
|
-
with:
|
|
22
|
-
node-version: "20"
|
|
23
|
-
|
|
24
|
-
- name: Configure Git
|
|
25
|
-
run: |
|
|
26
|
-
git config user.name "github-actions[bot]"
|
|
27
|
-
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
28
|
-
|
|
29
|
-
- name: Install dependencies
|
|
30
|
-
run: npm ci
|
|
31
|
-
|
|
32
|
-
- name: Run example tests
|
|
33
|
-
run: set -o pipefail && npx vitest run examples/*.test.mjs 2>&1 | tee test-output.log
|
|
34
|
-
env:
|
|
35
|
-
TD_API_KEY: ${{ secrets.TD_API_KEY }}
|
|
36
|
-
TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
|
|
37
|
-
TD_OS: linux
|
|
38
|
-
|
|
39
|
-
- name: Extract example URLs
|
|
40
|
-
if: success()
|
|
41
|
-
run: node docs/_scripts/extract-example-urls.js --file=test-output.log
|
|
42
|
-
|
|
43
|
-
- name: Generate example docs
|
|
44
|
-
if: success()
|
|
45
|
-
run: node docs/_scripts/generate-examples.js --skip-ai
|
|
46
|
-
env:
|
|
47
|
-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
48
|
-
|
|
49
|
-
- name: Commit and push updated docs
|
|
50
|
-
if: success()
|
|
51
|
-
run: |
|
|
52
|
-
git add docs/
|
|
53
|
-
git diff --staged --quiet || (git commit -m "docs: update example documentation [skip ci]" && git push origin main)
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
name: Windows Self-Hosted Tests
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_call:
|
|
5
|
-
inputs:
|
|
6
|
-
test_pattern:
|
|
7
|
-
description: "Test file pattern to run"
|
|
8
|
-
required: false
|
|
9
|
-
type: string
|
|
10
|
-
default: "examples/*.test.mjs"
|
|
11
|
-
secrets:
|
|
12
|
-
TD_API_KEY:
|
|
13
|
-
required: true
|
|
14
|
-
TWOCAPTCHA_API_KEY:
|
|
15
|
-
required: true
|
|
16
|
-
TD_WEBSITE:
|
|
17
|
-
required: false
|
|
18
|
-
AWS_ACCESS_KEY_ID:
|
|
19
|
-
required: true
|
|
20
|
-
AWS_SECRET_ACCESS_KEY:
|
|
21
|
-
required: true
|
|
22
|
-
|
|
23
|
-
jobs:
|
|
24
|
-
test:
|
|
25
|
-
runs-on: testdriver-16
|
|
26
|
-
|
|
27
|
-
steps:
|
|
28
|
-
- name: Checkout repository
|
|
29
|
-
uses: actions/checkout@v4
|
|
30
|
-
with:
|
|
31
|
-
fetch-depth: 0
|
|
32
|
-
|
|
33
|
-
- name: Set up Node.js
|
|
34
|
-
uses: actions/setup-node@v4
|
|
35
|
-
with:
|
|
36
|
-
node-version: "20"
|
|
37
|
-
cache: "npm"
|
|
38
|
-
|
|
39
|
-
- name: Install dependencies
|
|
40
|
-
run: npm ci
|
|
41
|
-
|
|
42
|
-
- name: Run Windows tests
|
|
43
|
-
run: set -o pipefail && npx vitest run ${{ inputs.test_pattern }} --maxWorkers 32 --sequence.concurrent 2>&1 | tee test-output.log
|
|
44
|
-
env:
|
|
45
|
-
TD_API_KEY: ${{ secrets.TD_API_KEY }}
|
|
46
|
-
TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
|
|
47
|
-
TD_WEBSITE: ${{ secrets.TD_WEBSITE }}
|
|
48
|
-
TD_OS: windows
|
|
49
|
-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
50
|
-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
51
|
-
AWS_REGION: us-east-2
|
|
52
|
-
AWS_LAUNCH_TEMPLATE_ID: lt-0ef9bf26a945fb442
|
|
53
|
-
AMI_ID: ami-0a29a02201634730e
|
|
54
|
-
RESOLUTION: 1920x1080
|
|
55
|
-
TD_API_ROOT: https://testdriver-api-pr-242.onrender.com
|
|
56
|
-
|
|
57
|
-
- name: Upload test results
|
|
58
|
-
if: always()
|
|
59
|
-
uses: actions/upload-artifact@v4
|
|
60
|
-
with:
|
|
61
|
-
name: test-results-windows
|
|
62
|
-
path: test-report.junit.xml
|
|
63
|
-
retention-days: 30
|
|
64
|
-
|
|
65
|
-
- name: Upload test output log
|
|
66
|
-
if: always()
|
|
67
|
-
uses: actions/upload-artifact@v4
|
|
68
|
-
with:
|
|
69
|
-
name: test-output-windows
|
|
70
|
-
path: test-output.log
|
|
71
|
-
retention-days: 30
|
|
72
|
-
|
|
73
|
-
- name: Upload TestDriver AI CLI logs
|
|
74
|
-
if: always()
|
|
75
|
-
uses: actions/upload-artifact@v4
|
|
76
|
-
with:
|
|
77
|
-
name: testdriverai-cli-logs-windows
|
|
78
|
-
path: /tmp/testdriverai-cli-*.log
|
|
79
|
-
if-no-files-found: warn
|
|
80
|
-
retention-days: 30
|