-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
I am seeing following error when running following mockforge command:
mockforge bench --spec billing_subscriptions_v1.json --target https://<any_server> --scenario constant --vus 50
Error:
time="2025-11-25T10:37:47+05:30" level=error msg="could not initialize 'bench-results/k6-script.js': could not load JS test 'file:///root/srikr/Tools/OpenAPISpec/bench-results/k6-script.js': file:///root/srikr/Too ls/OpenAPISpec/bench-results/k6-script.js: Line 6:12 Unexpected token . (and 19 more errors)" Error: k6 execution failed: k6 exited with status: exit status: 107
Steps to Reproduce
- Use the attached OpenAPI Spec(billing_subscriptions_v1.json)
- Install mockforge version 0.3.2 using command: cargo install mockforge-cli
- Run the command: mockforge bench --spec billing_subscriptions_v1.json --target https://<any_server> --scenario constant --vus 50
- This will throw above mentioned error
Expected Behavior
mockforge command should generate proper k6 javascript which should be able to run all type of openapi specs
Actual Behavior
Currently the problem seems like mockforge creates k6 javascript with variable names with dot that is not acceptable which is making k6 run failing
Version
v0.3.2
Rust Version
rustc 1.91.1 (ed61e7d7e 2025-11-07)
Operating System
Ubuntu 22.04
Additional Context
Checklist
- I have searched existing issues for duplicates
- I have included all relevant configuration files
- I have included complete error messages
- I am using the latest version of MockForge