Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message when using invalid character in scenario name #3601

Closed
dAnjou opened this issue Feb 14, 2024 · 1 comment · Fixed by #3655
Closed

Misleading error message when using invalid character in scenario name #3601

dAnjou opened this issue Feb 14, 2024 · 1 comment · Fixed by #3655
Assignees

Comments

@dAnjou
Copy link

dAnjou commented Feb 14, 2024

Brief summary

When using an invalid character in a scenario name, K6's error message is referring to the executor name instead:

ERRO[0000] There were problems with the specified script configuration:
        - scenario danjou.dev has configuration errors: the executor name should contain only numbers, latin letters, underscores, and dashes 

k6 version

k6 v0.49.0 (go1.21.6, darwin/arm64)

OS

macOS 14.3 (23D56)

Docker version and image (if applicable)

No response

Steps to reproduce the problem

Using the following setup: https://gist.github.com/dAnjou/930e0263d7be45b97233959a4c02f792

k6 run --env CONFIG=default.json script.js
k6 run --env CONFIG=scenario.json script.js
k6 run --env CONFIG=buggy.json script.js

Expected behaviour

The first 2 commands run a test.

The last one fails telling me there is an invalid character in the scenario name.

Actual behaviour

The first 2 commands run a test.

The last one fails telling me there is an invalid character in the executor name.

@joanlopez
Copy link
Contributor

Yeah, after a quick look, I'm pretty sure the validation function could be easily improved in terms of user experience and error message correctness.

I'll open a PR soon with some refinements, including the one your reported.

Good catch @dAnjou, thanks! 🙌🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants