Fixed so that we don't execute features with zero scenarios
Этот коммит содержится в:
родитель
1033ce083b
коммит
7df9dadeb9
11 изменённых файлов: 5 добавлений и 39 удалений
|
@ -9,7 +9,6 @@ Feature: event stream formatter
|
||||||
Then the following events should be fired:
|
Then the following events should be fired:
|
||||||
"""
|
"""
|
||||||
TestRunStarted
|
TestRunStarted
|
||||||
TestSource
|
|
||||||
TestRunFinished
|
TestRunFinished
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1 @@
|
||||||
[
|
[]
|
||||||
{
|
|
||||||
"uri": "formatter-tests/features/empty.feature",
|
|
||||||
"id": "empty-feature",
|
|
||||||
"keyword": "Feature",
|
|
||||||
"name": "empty feature",
|
|
||||||
"description": "",
|
|
||||||
"line": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
|
@ -1,10 +1 @@
|
||||||
[
|
[]
|
||||||
{
|
|
||||||
"uri": "formatter-tests/features/empty_with_description.feature",
|
|
||||||
"id": "empty-feature",
|
|
||||||
"keyword": "Feature",
|
|
||||||
"name": "empty feature",
|
|
||||||
"description": " describes\n an empty\n feature",
|
|
||||||
"line": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
{"event":"TestRunStarted","version":"0.1.0","timestamp":-6795364578871,"suite":"events"}
|
{"event":"TestRunStarted","version":"0.1.0","timestamp":-6795364578871,"suite":"events"}
|
||||||
{"event":"TestSource","location":"formatter-tests/features/empty.feature:1","source":"Feature: empty feature\n"}
|
|
||||||
{"event":"TestRunFinished","status":"pending","timestamp":-6795364578871,"snippets":"","memory":""}
|
{"event":"TestRunFinished","status":"pending","timestamp":-6795364578871,"snippets":"","memory":""}
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
{"event":"TestRunStarted","version":"0.1.0","timestamp":-6795364578871,"suite":"events"}
|
{"event":"TestRunStarted","version":"0.1.0","timestamp":-6795364578871,"suite":"events"}
|
||||||
{"event":"TestSource","location":"formatter-tests/features/empty_with_description.feature:1","source":"Feature: empty feature\n describes\n an empty\n feature\n"}
|
|
||||||
{"event":"TestRunFinished","status":"pending","timestamp":-6795364578871,"snippets":"","memory":""}
|
{"event":"TestRunFinished","status":"pending","timestamp":-6795364578871,"snippets":"","memory":""}
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuites name="junit" tests="0" skipped="0" failures="0" errors="0" time="0">
|
<testsuites name="junit" tests="0" skipped="0" failures="0" errors="0" time="0"></testsuites>
|
||||||
<testsuite name="empty feature" tests="0" skipped="0" failures="0" errors="0" time="0"></testsuite>
|
|
||||||
</testsuites>
|
|
|
@ -1,4 +1,2 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuites name="junit" tests="0" skipped="0" failures="0" errors="0" time="0">
|
<testsuites name="junit" tests="0" skipped="0" failures="0" errors="0" time="0"></testsuites>
|
||||||
<testsuite name="empty feature" tests="0" skipped="0" failures="0" errors="0" time="0"></testsuite>
|
|
||||||
</testsuites>
|
|
|
@ -1,4 +1,3 @@
|
||||||
<bold-white>Feature:</bold-white> empty feature
|
|
||||||
|
|
||||||
No scenarios
|
No scenarios
|
||||||
No steps
|
No steps
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
<bold-white>Feature:</bold-white> empty feature
|
|
||||||
describes
|
|
||||||
an empty
|
|
||||||
feature
|
|
||||||
|
|
||||||
No scenarios
|
No scenarios
|
||||||
No steps
|
No steps
|
||||||
|
|
|
@ -153,7 +153,7 @@ func filterFeatures(tags string, features []*feature) (result []*feature) {
|
||||||
for _, ft := range features {
|
for _, ft := range features {
|
||||||
ft.pickles = applyTagFilter(tags, ft.pickles)
|
ft.pickles = applyTagFilter(tags, ft.pickles)
|
||||||
|
|
||||||
if ft.Feature != nil {
|
if ft.Feature != nil && len(ft.pickles) > 0 {
|
||||||
result = append(result, ft)
|
result = append(result, ft)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
run.go
4
run.go
|
@ -170,10 +170,6 @@ func (r *runner) scenarioConcurrent(rate int) (failed bool) {
|
||||||
copy(pickles, ft.pickles)
|
copy(pickles, ft.pickles)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(pickles) == 0 {
|
|
||||||
r.fmt.Feature(ft.GherkinDocument, ft.Uri, ft.content)
|
|
||||||
}
|
|
||||||
|
|
||||||
for i, p := range pickles {
|
for i, p := range pickles {
|
||||||
pickle := *p
|
pickle := *p
|
||||||
|
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче