File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# v2.3.0
22
3+ - Preserve test execution order alphabetical order
34 - Add property ` skip ` , adds the ability to skip test cases
45
56# v2.2.0
Original file line number Diff line number Diff line change 11[ ![ Build Status] ( https://travis-ci.org/commander-cli/commander.svg?branch=master )] ( https://travis-ci.org/commander-cli/commander )
22[ ![ GoDoc] ( https://godoc.org/github.com/commander-cli/commander?status.svg )] ( https://godoc.org/github.com/commander-cli/commander )
3- [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/commander-cli/commander )] ( https://goreportcard.com/report/github.com/SimonBaeumer /commander )
3+ [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/commander-cli/commander )] ( https://goreportcard.com/report/github.com/commander-cli /commander )
44[ ![ Maintainability] ( https://api.codeclimate.com/v1/badges/cc848165784e0f809a51/maintainability )] ( https://codeclimate.com/github/commander-cli/commander/maintainability )
55[ ![ Test Coverage] ( https://api.codeclimate.com/v1/badges/cc848165784e0f809a51/test_coverage )] ( https://codeclimate.com/github/commander-cli/commander/test_coverage )
66[ ![ Github All Releases] ( https://img.shields.io/github/downloads/commander-cli/commander/total.svg )] ( https://github.com/commander-cli/commander/releases )
Original file line number Diff line number Diff line change @@ -47,6 +47,27 @@ func TestRuntime_WithRetries(t *testing.T) {
4747 assert .Equal (t , 1 , counter )
4848}
4949
50+ func Test_AlphabeticalOrder (t * testing.T ) {
51+ tests := []TestCase {
52+ {Title : "bbb" , Command : CommandUnderTest {Cmd : "exit 0;" }},
53+ {Title : "aaa" },
54+ {Title : "111" },
55+ {Title : "_" },
56+ }
57+
58+ got := []string {}
59+ runtime := NewRuntime (& EventHandler {TestFinished : func (r TestResult ) {
60+ got = append (got , r .TestCase .Title )
61+ }})
62+
63+ runtime .Start (tests )
64+
65+ assert .Equal (t , "111" , got [0 ])
66+ assert .Equal (t , "_" , got [1 ])
67+ assert .Equal (t , "aaa" , got [2 ])
68+ assert .Equal (t , "bbb" , got [3 ])
69+ }
70+
5071func Test_RuntimeWithRetriesAndInterval (t * testing.T ) {
5172 s := getExampleTestCases ()
5273 s [0 ].Command .Retries = 3
You can’t perform that action at this time.
0 commit comments