-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improve UX of the new
command
#4154
Comments
I really like the templates idea, but the fact that |
Generally speaking, I also think that a simple templates mechanism would be needed here. Indeed, I think we even discussed that specifically at time of releasing That said,
I agree with @andrewslotin that |
Yup, makes sense! Thoughts on this @oleiade?
I'm not really sure about this. It seems a bit redundant to have a Cloud template when any of the existing templates can be converted (rather easily) to a Cloud test. |
Sorry, I wasn't clear enough. I didn't want to mean exactly like browser or protocol, but some option you can set on the templating system. Like with X or Y, where one of these would be with cloud. I explained it like this because I wanted to point to the fact that I see it as another option of the same templating system, and not a "completely separated" thing (like a different (sub)command). In essence, how I envision it , I think it's similar to your draft PR, except for the sub-command and its naming. |
Hey folks 👋🏻 I agree that it might be better to restrict the proposal to modifying Regarding templates, I gave that feedback to @dgzlopes prior to the issue that from a UX perspective I believe we should limit the amount of templates supported natively/out of the box by k6 to use-cases focused ones, like in this proposal: "as a user I want to write a browser test/functional test/protocol test", or "As a user, I want to run a test in the cloud, or in my local machine, or in kubernetes (insert anything relevant here"; essentially what and where, but limited to the minimum. We should also aim to support custom/user-defined templates, but that shouldn't block to move forward. Personally, I'd be really satisfied with the current state of the proposal already. Side-thought: maybe a cheap first step towards templates would be to offer environment variables interpolation in the k6 new command. As-in: if you use environment variables in your script Let's do it 🚀 🙇🏻 |
Gotcha! I have updated the draft PR to only have a single command 👍 (& fixed a bunch of linting issues) If the user adds
I think this would be very useful if we let users define their own templates b/c they can build conditional generation logic without us having to add support for "custom user-defined" flags/arguments. |
Feature Description
The
k6 new
command was introduced to:After seeing it used in many places, I have detected some problems:
Suggested Solution (optional)
k6 new
k6 cloud new
--project-id
to override the dummy one.k6 cloud new --project-id 123145
k6 cloud new --project-id 123145 --template=browser
Minimal (default) - Small and concise script. It is ideal for folks who need a starting point for a new project
Protocol - More real script. It is ideal for folks learning, as a reference, or for demos.
Browser - Same as Protocol but with Browser.
(Future: We could let people leverage external templates)
Already existing or connected issues / PRs (optional)
#4153
The text was updated successfully, but these errors were encountered: