Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip only features that don't match the criteria #428

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkg/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ func (e *testEnv) processTestActions(ctx context.Context, t *testing.T, actions
func (e *testEnv) processTestFeature(ctx context.Context, t *testing.T, featureName string, feature types.Feature) context.Context {
skipped, message := e.requireFeatureProcessing(feature)
if skipped {
t.Skipf(message)
t.Log(message)
return ctx
Comment on lines +211 to +212
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not mark the test as SKIP'ed correct ? The intent of skip here was to make it clear that the test was skipped. Returning ctx will not mark the test as skipped. Can be misleading.

}
// execute beforeEachFeature actions
ctx = e.processFeatureActions(ctx, t, feature, e.getBeforeFeatureActions())
Expand Down Expand Up @@ -475,7 +476,8 @@ func (e *testEnv) execFeature(ctx context.Context, t *testing.T, featName string
newT.Run(assessName, func(internalT *testing.T) {
skipped, message := e.requireAssessmentProcessing(assess, i+1)
if skipped {
internalT.Skipf(message)
internalT.Log(message)
return
}
// Set shouldFailNow to true before actually running the assessment, because if the assessment
// calls t.FailNow(), the function will be abruptly stopped in the middle of `e.executeSteps()`.
Expand Down