@@ -23,11 +23,36 @@ const Codecept = require(process.env.CODECEPT_CLASS_PATH || '../../codecept')
23
23
const { options, tests, testRoot, workerIndex, poolMode } = workerData
24
24
25
25
// hide worker output
26
- if ( ! options . debug && ! options . verbose )
26
+ // In pool mode, always hide worker output to prevent duplicate output
27
+ // In regular mode, hide result output but allow step output in verbose/debug
28
+ if ( poolMode || ( ! options . debug && ! options . verbose ) ) {
27
29
process . stdout . write = string => {
28
30
stdout += string
29
31
return true
30
32
}
33
+ } else {
34
+ // In verbose/debug mode for test/suite modes, show step details
35
+ // but suppress individual worker result summaries to avoid duplicate output
36
+ const originalWrite = process . stdout . write
37
+ const originalConsoleLog = console . log
38
+
39
+ process . stdout . write = string => {
40
+ // Suppress individual worker result summaries and failure reports
41
+ if ( string . includes ( ' FAIL |' ) || string . includes ( ' OK |' ) || string . includes ( '-- FAILURES:' ) || string . includes ( 'AssertionError:' ) || string . includes ( '◯ File:' ) || string . includes ( '◯ Scenario Steps:' ) ) {
42
+ return true
43
+ }
44
+ return originalWrite . call ( process . stdout , string )
45
+ }
46
+
47
+ // Override console.log to catch result summaries
48
+ console . log = ( ...args ) => {
49
+ const fullMessage = args . join ( ' ' )
50
+ if ( fullMessage . includes ( ' FAIL |' ) || fullMessage . includes ( ' OK |' ) || fullMessage . includes ( '-- FAILURES:' ) ) {
51
+ return
52
+ }
53
+ return originalConsoleLog . apply ( console , args )
54
+ }
55
+ }
31
56
32
57
const overrideConfigs = tryOrDefault ( ( ) => JSON . parse ( options . override ) , { } )
33
58
0 commit comments