-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Redesign CLI #909
Comments
Would it make sense to have sub commands for openapi and graphql? E.g. $ schemathesis graphql [... [url]]
$ schemathesis openapi [... [url]] |
It is definitely an option to consider. I am not entirely sure what will be the most intuitive way to use Schemathesis, but this approach adds an additional step for the user - explicitly specify the spec. It is not much, though, but on the other hand having a single command that tests an API is cool, no need to worry about the spec version, etc. But subcommands are more explicit. Yesterday I was also thinking about auto-detecting GraphQL - which may also be an option, which in the worst case will cost multiple requests to the schema (there will be some fallback options) |
Ohh I like the auto detect idea, but it would be good to have the possibility to explicitly override the auto detect as well. The override could be something like Auto detection is far superior UX imho. Something else that would be really nice is man-pages. I love well written man-pages, frequently saves me from a context switch by round tripping google via the browser. |
@Stranger6667 Have you seen this site? I don’t agree with everything 100% but it does make some good points worth considering. |
Yep, overriding should be available, I recently added
Agree. Having to pay an extra HTTP call (in the worst case) is basically nothing :)
Great idea! I am not using them much, but it definitely will improve the UX (probably something like https://github.com/click-contrib/click-man can be used)
No, thank you for suggesting :) Yesterday I found some links relevant to the CLI design (all of them are mentioned at the end of this one). Now, after reading it, I have a long list of things to investigate deeper :) |
This issue is quite outdated, going to close it and open more concise ones if needed. |
It turned out that the current CLI design is pretty stiffed and doesn't easily allow adding new features (e.g., adding the "Stateful testing" feature is painful). Other things:
--method
,--operation-id
, etc.). Adding GraphQL may be done with adding another option with choices & ignoring other options, but it just another addition to the pile of technical debt :(--hypothesis-max-examples
option. This is connected with how Hypothesis works but still confusing for the end-user.It was mostly copied from pytest, but probably it is not the best fit for the Schemathesis workflows :(
I want to redesign the Runner / CLI pair so it is more consistent & task-oriented.
The text was updated successfully, but these errors were encountered: