Skip to content

Commit a553dbe

Browse files
committed
Add usage test command usage documentation
1 parent b52ef39 commit a553dbe

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

cmd/commander/commander.go

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,22 @@ func createCliApp() *cli.App {
4646
func createTestCommand() cli.Command {
4747
return cli.Command{
4848
Name: "test",
49-
Usage: "Execute the test suite, by default it will use the commander.yaml from your current directory",
49+
Usage: `Execute cli app tests
50+
51+
By default it will use the commander.yaml from your current directory.
52+
Tests are always executed in alphabetical order.
53+
54+
Examples:
55+
56+
Filtering tests:
57+
test commander.yaml --filter="my test"
58+
59+
Multiple filters:
60+
test commander.yaml --filter=filter1 --filter=filter2
61+
62+
Regex filters:
63+
test commander.yaml --filter="^filter1$"
64+
`,
5065
ArgsUsage: "[file] [--filter]",
5166
Flags: []cli.Flag{
5267
cli.BoolFlag{
@@ -65,14 +80,7 @@ func createTestCommand() cli.Command {
6580
},
6681
cli.StringSliceFlag{
6782
Name: "filter",
68-
Usage: `Filter tests by a given regex pattern. Tests are filtered by its title.
69-
70-
Example:
71-
test commander.yaml --filter="my test"
72-
73-
Apply multiple filters:
74-
test commander.yaml --filter=filter1 --filter=filter2
75-
`,
83+
Usage: `Filter tests by a given regex pattern. Tests are filtered by its title.`,
7684
},
7785
},
7886
Action: func(c *cli.Context) error {

0 commit comments

Comments
 (0)