Skip to content

Commit

Permalink
improve UX & DX in Venom CLI (#491)
Browse files Browse the repository at this point in the history
* feat: improve CLI usage messages
Signed-off-by: scraly <scraly@gmail.com>

* feat: improve CLI usage messages
Signed-off-by: scraly <scraly@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
  • Loading branch information
scraly authored Jan 24, 2022
1 parent a13fdf7 commit b71ee54
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ tests.log
./.venomrc
test_results.xml
*.prof
git-template
2 changes: 1 addition & 1 deletion cmd/venom/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

var rootCmd = &cobra.Command{
Use: "venom",
Short: "Venom - RUN Integration Tests",
Short: "Venom aim to create, manage and run your integration tests with efficiency",
}

func main() {
Expand Down
15 changes: 11 additions & 4 deletions cmd/venom/run/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,17 @@ func displayArg(ctx context.Context) {
var Cmd = &cobra.Command{
Use: "run",
Short: "Run Tests",
Long: `
$ venom run *.yml
Notice that variables initialized with -var-from-file argument can be overrided with -var argument.`,
Example: ` Run all testsuites containing in files ending with *.yml: venom run
Run a single testsuite: venom run mytestfile.yml
Run a single testsuite and export the result in JSON format in test/ folder: venom run mytestfile.yml --format=json --output-dir=test
Run a single testsuite and specify a variable: venom run mytestfile.yml --var="foo=bar"
Run a single testsuite and load all variables from a file: venom run mytestfile.yml --var-from-file variables.yaml
Run all testsuites containing in files ending with *.yml with verbosity: VENOM_VERBOSE=2 venom run
Notice that variables initialized with -var-from-file argument can be overrided with -var argument
More info: https://github.com/ovh/venom`,
Long: `run integration tests`,
PreRun: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
path = append(path, ".")
Expand Down

0 comments on commit b71ee54

Please sign in to comment.