Skip to content

Commit d6736c2

Browse files
authored
feat: add batch execution script and update test command in package.json (#56)
* feat: add batch execution script and update test command in package.json * feat: add config.yml for batch execution settings and update test command in package.json * fix: replace sleep with waitForNetworkIdle for better page load handling in demo.ts * chore: reduce sleep duration in demo.ts and update @midscene/cli to latest version in package.json
1 parent fa47810 commit d6736c2

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

yaml-scripts-demo/config.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Example batch execution index YAML file
2+
# This demonstrates how to use the multi-YAML file batch execution feature
3+
4+
# Concurrency settings (default: 1 for sequential execution)
5+
concurrent: 2
6+
7+
# Continue execution even if one file fails (default: false)
8+
continueOnError: false
9+
10+
# Summary output file
11+
summary: "./midscene_run/output/custom-summary.json"
12+
13+
# Global web environment configuration (applied to all files)
14+
web:
15+
# All individual YAML files will inherit these settings
16+
viewportWidth: 1280
17+
viewportHeight: 720
18+
# bridgeMode: "newTabWithUrl"
19+
# Output directory for individual files (will be combined with file-specific paths)
20+
21+
# Global android environment configuration (if needed)
22+
# android:
23+
# deviceId: "emulator-5554"
24+
25+
# Execution order using glob patterns
26+
files:
27+
- "midscene-scripts/extract-github-status.yaml"
28+
- "midscene-scripts/local-static-server.yml"
29+
- "midscene-scripts/s*.yaml"

yaml-scripts-demo/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"main": "index.js",
77
"type": "module",
88
"scripts": {
9-
"test": "midscene ./midscene-scripts"
9+
"test": "midscene ./midscene-scripts",
10+
"test:config": "midscene --config config.yml"
1011
},
1112
"author": "",
1213
"license": "MIT",

0 commit comments

Comments
 (0)