@@ -100,10 +100,19 @@ open class TestConfiguration: ITestConfiguration {
100100 }
101101
102102 func runSteps( _ scenario: Scenario ) async throws -> ScenarioOutcome {
103+ let tagString = TestConfiguration . shared ( ) . environment [ " TAGS " ]
104+ let tagFilter = TagFilter ( from: tagString)
105+ let scenarioTags = scenario. feature!. tags + scenario. tags
106+ if !tagFilter. shouldRun ( scenarioTags: scenarioTags) {
107+ scenario. disabled = true
108+ }
103109 if scenario. disabled {
104- return ScenarioOutcome ( scenario)
110+ let outcome = ScenarioOutcome ( scenario)
111+ outcome. status = . skipped
112+ return outcome
105113 }
106114
115+
107116 let scenarioOutcome = ScenarioOutcome ( scenario)
108117 scenarioOutcome. start ( )
109118
@@ -222,6 +231,9 @@ open class TestConfiguration: ITestConfiguration {
222231 currentFeatureOut. scenarioOutcomes. append ( scenarioOutcome)
223232 try await report ( . AFTER_SCENARIO, scenarioOutcome)
224233 try await tearDownActors ( )
234+ if ( scenarioOutcome. status == . skipped) {
235+ throw XCTSkip ( )
236+ }
225237 }
226238
227239 public func afterFeature( _ featureOutcome: FeatureOutcome ) async throws {
@@ -252,7 +264,7 @@ open class TestConfiguration: ITestConfiguration {
252264 /// signals the suite has ended
253265 public func end( ) {
254266 let semaphore = DispatchSemaphore ( value: 0 )
255- Task . detached {
267+ Task . detached ( priority : . userInitiated ) {
256268 self . suiteOutcome. end ( )
257269 try await self . afterFeatures ( self . suiteOutcome. featureOutcomes)
258270 try await self . tearDownInstance ( )
@@ -335,13 +347,14 @@ open class TestConfiguration: ITestConfiguration {
335347 instance. suiteOutcome. start ( )
336348 self . instance = instance
337349
338- do {
339- try await instance. setUp ( )
340- try await instance. setUpReporters ( )
341- try await instance. setUpSteps ( )
342- } catch {
343- throw ConfigurationError . setup ( message: error. localizedDescription)
344- }
350+ print ( " Setting up configuration instance " )
351+ try await instance. setUp ( )
352+
353+ print ( " Setting up reporters " )
354+ try await instance. setUpReporters ( )
355+
356+ print ( " Setting up steps " )
357+ try await instance. setUpSteps ( )
345358
346359 /// setup hamcrest to update variable if failed
347360 HamcrestReportFunction = { message, file, line in
0 commit comments