MCPcopy Create free account
hub / github.com/commander-cli/commander / execute

Function execute

pkg/app/test_command.go:157–176  ·  view source on GitHub ↗
(s suite.Suite, filters runtime.Filters)

Source from the content-addressed store, hash-verified

155}
156
157func execute(s suite.Suite, filters runtime.Filters) (runtime.Result, error) {
158 tests := s.GetTests()
159 if len(filters) != 0 {
160 tests = []runtime.TestCase{}
161 }
162
163 // Filter tests if test filters was given
164 for _, f := range filters {
165 t, err := s.FindTests(f)
166 if err != nil {
167 return runtime.Result{}, err
168 }
169 tests = append(tests, t...)
170 }
171
172 r := runtime.NewRuntime(out.GetEventHandler(), s.Nodes...)
173 result := r.Start(tests)
174
175 return result, nil
176}
177
178func getSuite(filePath string, fileName string) (suite.Suite, error) {
179 s := suite.Suite{}

Callers 3

testFileFunction · 0.85
testURLFunction · 0.85
testStdinFunction · 0.85

Calls 5

StartMethod · 0.95
NewRuntimeFunction · 0.92
GetTestsMethod · 0.80
FindTestsMethod · 0.80
GetEventHandlerMethod · 0.80

Tested by

no test coverage detected