From 377e8734f2cb9c640cf4ac41b7babd15a4437ee3 Mon Sep 17 00:00:00 2001 From: Github Actions Date: Wed, 16 Aug 2023 19:11:39 +0000 Subject: [PATCH 1/3] Version bump --- box.json | 2 +- changelog.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/box.json b/box.json index 538bd2e..f090e7f 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"TestBox CLI", - "version":"1.1.2", + "version":"1.2.0", "location":"https://downloads.ortussolutions.com/ortussolutions/commandbox-modules/testbox-cli/@build.version@/testbox-cli-@build.version@.zip", "slug":"testbox-cli", "author":"Ortus Solutions, Corp", diff --git a/changelog.md b/changelog.md index 56190a8..74e856e 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.1.2] - 2023-08-16 + ### Fixed - Missing another older injection @@ -46,7 +48,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - New `testbox apidocs` command to open the TestBox API Docs in your browser. - Initial Creation of this project -[Unreleased]: https://github.com/Ortus-Solutions/testbox-cli/compare/v1.1.1...HEAD +[Unreleased]: https://github.com/Ortus-Solutions/testbox-cli/compare/v1.1.2...HEAD + +[1.1.2]: https://github.com/Ortus-Solutions/testbox-cli/compare/v1.1.1...v1.1.2 [1.1.1]: https://github.com/Ortus-Solutions/testbox-cli/compare/v1.1.0...v1.1.1 From bc4addcea93a5abcd5bfda178c84f37354486147 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Wed, 16 Aug 2023 21:28:03 +0200 Subject: [PATCH 2/3] - More fixes on runner not working --- box.json | 2 +- changelog.md | 18 ++++++++++++ models/CLIRenderer.cfc | 66 +++++++++++++++++++++--------------------- 3 files changed, 52 insertions(+), 34 deletions(-) diff --git a/box.json b/box.json index f090e7f..f0e9c4a 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"TestBox CLI", - "version":"1.2.0", + "version":"1.1.3", "location":"https://downloads.ortussolutions.com/ortussolutions/commandbox-modules/testbox-cli/@build.version@/testbox-cli-@build.version@.zip", "slug":"testbox-cli", "author":"Ortus Solutions, Corp", diff --git a/changelog.md b/changelog.md index 74e856e..715056d 100644 --- a/changelog.md +++ b/changelog.md @@ -9,18 +9,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- More fixes on runner not working + +* * * + ## [1.1.2] - 2023-08-16 ### Fixed - Missing another older injection +* * * + ## [1.1.1] - 2023-08-16 ### Fixed - Invalid module name since we refactored, so all testing runners are failing. +* * * + ## [1.1.0] - 2023-07-28 ### Added @@ -28,18 +38,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - TestBox 5 modules support - New updated test harness +* * * + ## [1.0.3] - 2023-05-17 - Invalid version fixed +* * * + ## [1.0.2] - 2023-05-17 - Invalid version fixed +* * * + ## [1.0.1] - 2023-05-17 - Invalid version fixed +* * * + ## [1.0.0] - 2023-05-17 ### Added diff --git a/models/CLIRenderer.cfc b/models/CLIRenderer.cfc index 48f997a..652acc6 100644 --- a/models/CLIRenderer.cfc +++ b/models/CLIRenderer.cfc @@ -27,14 +27,14 @@ component { */ function render( print, testData, verbose ){ var thisColor = getAggregatedColor( - testData.totalError, - testData.totalFail, + arguments.testData.totalError, + arguments.testData.totalFail, 0 ); var didPrint = false; - for ( thisBundle in testData.bundleStats ) { - if ( ( thisBundle.totalFail + thisBundle.totalError ) == 0 && !verbose ) { + for ( var thisBundle in arguments.testData.bundleStats ) { + if ( ( thisBundle.totalFail + thisBundle.totalError ) == 0 && !arguments.verbose ) { continue; } @@ -51,7 +51,7 @@ component { thisStatus = "skipped"; } - variables.print + arguments.print .line() .line( "#getIndicator( thisStatus )##thisBundle.path# (#thisBundle.totalDuration# ms)", @@ -65,7 +65,7 @@ component { // Check if the bundle threw a global exception if ( !isSimpleValue( thisBundle.globalException ) ) { - variables.print + arguments.print .line( "GLOBAL BUNDLE EXCEPTION", COLOR.ERROR @@ -95,7 +95,7 @@ component { ); // code print for first stack frame if supported by the CFML engine - if ( arguments.index == 1 && item.keyExists( "codePrintPlain" ) ) { + if ( index == 1 && item.keyExists( "codePrintPlain" ) ) { print.line().line( item.codePrintPlain ); } } @@ -103,7 +103,7 @@ component { // ACF has an array for the stack trace if ( isSimpleValue( thisBundle.globalException.stacktrace ) && !errorStack.len() ) { - variables.print + arguments.print .line( "---------------------------------------------------------------------------------", COLOR.ERROR @@ -124,7 +124,7 @@ component { .line( "END STACKTRACE", COLOR.ERROR ); } - print.line( + arguments.print.line( "---------------------------------------------------------------------------------", COLOR.ERROR ); @@ -136,56 +136,56 @@ component { suiteStats = suiteStats, bundleStats = thisBundle, level = 1, - print = print, - verbose = verbose + print = arguments.print, + verbose = arguments.verbose ); } } // Print Summary // cfformat-ignore-start - variables.print + arguments.print .line() .line( "╔═════════════════════════════════════════════════════════════════════╗", thisColor ) .line( "║ Passed ║ Failed ║ Errored ║ Skipped ║ Bundles ║ Suites ║ Specs ║", thisColor ) .line( "╠═════════════════════════════════════════════════════════════════════╣", thisColor ) .line( - "║ #headerCell( testData.totalPass )# ║ #headerCell( testData.totalFail )# ║ #headerCell( testData.totalError )# ║ #headerCell( testData.totalSkipped )# ║ #headerCell( testData.totalBundles )# ║ #headerCell( testData.totalSuites )# ║ #headerCell( testData.totalSpecs )# ║", + "║ #headerCell( arguments.testData.totalPass )# ║ #headerCell( arguments.testData.totalFail )# ║ #headerCell( arguments.testData.totalError )# ║ #headerCell( arguments.testData.totalSkipped )# ║ #headerCell( arguments.testData.totalBundles )# ║ #headerCell( arguments.testData.totalSuites )# ║ #headerCell( arguments.testData.totalSpecs )# ║", thisColor ) .line( "╚═════════════════════════════════════════════════════════════════════╝", thisColor ) .line() - .line( "TestBox " & ( !isNull( testData.version ) ? "v#testData.version#" : "" ) ) - .line( "CFML Engine " & ( !isNull( testData.cfmlEngine ) ? "#testData.cfmlEngine# v#testData.cfmlEngineVersion#" : "" ) ) - .line( "Duration #numberFormat( testData.totalDuration )#ms" ) - .line( "Labels " & ( arrayLen( testData.labels ) ? arrayToList( testData.labels ) : "---" ) ); + .line( "TestBox " & ( !isNull( arguments.testData.version ) ? "v#arguments.testData.version#" : "" ) ) + .line( "CFML Engine " & ( !isNull( arguments.testData.cfmlEngine ) ? "#arguments.testData.cfmlEngine# v#arguments.testData.cfmlEngineVersion#" : "" ) ) + .line( "Duration #numberFormat( arguments.testData.totalDuration )#ms" ) + .line( "Labels " & ( arrayLen( arguments.testData.labels ) ? arrayToList( arguments.testData.labels ) : "---" ) ); // cfformat-ignore-end - if ( isDefined( "testData.coverage.enabled" ) && testData.coverage.enabled ) { - variables.print + if ( isDefined( "arguments.testData.coverage.enabled" ) && arguments.testData.coverage.enabled ) { + arguments.print .line( - "Coverage #testData.coverage.data.stats.totalCoveredLines# / #testData.coverage.data.stats.totalExecutableLines# LOC (#numberFormat( - testData.coverage.data.stats.percTotalCoverage * 100, + "Coverage #arguments.testData.coverage.data.stats.totalCoveredLines# / #arguments.testData.coverage.data.stats.totalExecutableLines# LOC (#numberFormat( + arguments.testData.coverage.data.stats.percTotalCoverage * 100, "9.9" )#%) Covered" ) .line(); - if ( len( testData.coverage.data.sonarQubeResults ) ) { - print.blueLine( "Coverage: SonarQube file written to [#testData.coverage.data.sonarQubeResults#]" ); + if ( len( arguments.testData.coverage.data.sonarQubeResults ) ) { + arguments.print.blueLine( "Coverage: SonarQube file written to [#arguments.testData.coverage.data.sonarQubeResults#]" ); } - if ( len( testData.coverage.data.browserResults ) ) { - print.blueLine( "Coverage: Browser written to [#testData.coverage.data.browserResults#]" ); + if ( len( arguments.testData.coverage.data.browserResults ) ) { + arguments.print.blueLine( "Coverage: Browser written to [#arguments.testData.coverage.data.browserResults#]" ); } } // Skip this redundant line if no specs printed above in the previous suite if ( didPrint ) { - print.line(); + arguments.print.line(); } // If verbose print the final footer report - if ( verbose ) { - variables.print + if ( arguments.verbose ) { + arguments.print .text( "#getIndicator( "passed" )#Passed", COLOR.PASS @@ -242,7 +242,7 @@ component { required verbose ){ // Return if not in verbose mode nd no errors - if ( ( arguments.suiteStats.totalFail + arguments.suiteStats.totalError ) == 0 && !verbose ) { + if ( ( arguments.suiteStats.totalFail + arguments.suiteStats.totalError ) == 0 && !arguments.verbose ) { return false; } @@ -264,7 +264,7 @@ component { listFindNoCase( "failed,exception,error", local.thisSpec.status - ) == 0 && !verbose + ) == 0 && !arguments.verbose ) { continue; } @@ -318,7 +318,7 @@ component { // code print for first stack frame if supported by the CFML engine if ( arguments.index == 1 && item.keyExists( "codePrintPlain" ) ) { - variables.print + arguments.print .line() .line( "#repeatString( " ", level + 2 )##item.codePrintPlain.replace( @@ -340,8 +340,8 @@ component { local.nestedSuite, arguments.bundleStats, arguments.level + 1, - print, - verbose + arguments.print, + arguments.verbose ) printedAtLeastOneLine = printedAtLeastOneLine || didPrint; } From a591840a9a972c0e2211dac7ba4e9d4d06a574d3 Mon Sep 17 00:00:00 2001 From: lmajano Date: Wed, 16 Aug 2023 19:28:38 +0000 Subject: [PATCH 3/3] Apply cfformat changes --- models/CLIRenderer.cfc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/models/CLIRenderer.cfc b/models/CLIRenderer.cfc index 652acc6..9afadd6 100644 --- a/models/CLIRenderer.cfc +++ b/models/CLIRenderer.cfc @@ -171,10 +171,14 @@ component { ) .line(); if ( len( arguments.testData.coverage.data.sonarQubeResults ) ) { - arguments.print.blueLine( "Coverage: SonarQube file written to [#arguments.testData.coverage.data.sonarQubeResults#]" ); + arguments.print.blueLine( + "Coverage: SonarQube file written to [#arguments.testData.coverage.data.sonarQubeResults#]" + ); } if ( len( arguments.testData.coverage.data.browserResults ) ) { - arguments.print.blueLine( "Coverage: Browser written to [#arguments.testData.coverage.data.browserResults#]" ); + arguments.print.blueLine( + "Coverage: Browser written to [#arguments.testData.coverage.data.browserResults#]" + ); } }