@@ -91,7 +91,7 @@ export function getTestResults(
9191 ( file ) => file . startsWith ( filePrefix ) && file . endsWith ( fileSuffix ) ,
9292 ) ;
9393 } catch ( e ) {
94- console . error ( `An error occurred while reading directory ${ runnerTemp } :` , e ) ;
94+ console . error ( `An error occurred while finding test results summary file(s) in directory ${ runnerTemp } :` , e ) ;
9595 return null ;
9696 }
9797
@@ -202,17 +202,19 @@ export function addSummary(
202202 if ( testResultsData ) {
203203 for ( let i = 0 ; i < testResultsData . TestSessions . length ; i ++ ) {
204204 const session = testResultsData . TestSessions [ i ] ;
205- const sessionNumber =
206- testResultsData . TestSessions . length > 1 ? ` (Session ${ i + 1 } )` : "" ;
207205
208- // Add session header with stats
209- core . summary
210- . addHeading ( `Test Session${ sessionNumber } ` , 3 )
211- . addRaw ( getTestHeader ( session . Stats ) , true ) ;
206+ if ( testResultsData . TestSessions . length > 1 ) {
207+ // Add session header with stats
208+ core . summary
209+ . addHeading ( `Test Session (Session ${ i + 1 } )` , 3 )
210+ . addRaw ( getTestHeader ( session . Stats ) , true ) ;
211+ }
212212
213213 // Add detailed results for this session
214214 const detailedResults = getDetailedResults ( session . TestResults ) ;
215- core . summary . addRaw ( detailedResults , true ) ;
215+ core . summary
216+ . addHeading ( "All tests" , 4 )
217+ . addRaw ( detailedResults , true ) ;
216218 }
217219 }
218220 } catch ( e ) {
0 commit comments