Skip to content
Merged
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
52 changes: 30 additions & 22 deletions system/TestBox.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -405,17 +405,22 @@ component accessors="true" {
);

// Verify URL conventions for bundle, suites and specs exclusions.
if ( structKeyExists( url, "testBundles" ) && !isNull( url.testBundles ) ) {
testBundles.append( listToArray( urlDecode( url.testBundles ) ), true );
}
if ( structKeyExists( url, "testSuites" ) && !isNull( url.testSuites ) ) {
arguments.testSuites.append( listToArray( urlDecode( url.testSuites ) ), true );
}
if ( structKeyExists( url, "testSpecs" ) && !isNull( url.testSpecs ) ) {
arguments.testSpecs.append( listToArray( urlDecode( url.testSpecs ) ), true );
}
if ( structKeyExists( url, "testMethod" ) && !isNull( url.testMethod ) ) {
arguments.testSpecs.append( listToArray( urlDecode( url.testMethod ) ), true );
// The `url` scope only exists in a real HTTP request - it isn't registered at all when
// TestBox runs via the BoxLang CLI, so even a `structKeyExists( url, ... )` guard throws
// (resolving the bare `url` identifier is what fails, not the key lookup within it).
if ( !variables.IS_CLI ) {
if ( structKeyExists( url, "testBundles" ) && !isNull( url.testBundles ) ) {
testBundles.append( listToArray( urlDecode( url.testBundles ) ), true );
}
if ( structKeyExists( url, "testSuites" ) && !isNull( url.testSuites ) ) {
arguments.testSuites.append( listToArray( urlDecode( url.testSuites ) ), true );
}
if ( structKeyExists( url, "testSpecs" ) && !isNull( url.testSpecs ) ) {
arguments.testSpecs.append( listToArray( urlDecode( url.testSpecs ) ), true );
}
if ( structKeyExists( url, "testMethod" ) && !isNull( url.testMethod ) ) {
arguments.testSpecs.append( listToArray( urlDecode( url.testMethod ) ), true );
}
}

// Using a directory runner?
Expand Down Expand Up @@ -524,17 +529,20 @@ component accessors="true" {
isSimpleValue( arguments.testSpecs ) ? listToArray( arguments.testSpecs ) : arguments.testSpecs
);

if ( structKeyExists( url, "testBundles" ) && !isNull( url.testBundles ) ) {
arguments.testBundles.append( listToArray( urlDecode( url.testBundles ) ), true );
}
if ( structKeyExists( url, "testSuites" ) && !isNull( url.testSuites ) ) {
arguments.testSuites.append( listToArray( urlDecode( url.testSuites ) ), true );
}
if ( structKeyExists( url, "testSpecs" ) && !isNull( url.testSpecs ) ) {
arguments.testSpecs.append( listToArray( urlDecode( url.testSpecs ) ), true );
}
if ( structKeyExists( url, "testMethod" ) && !isNull( url.testMethod ) ) {
arguments.testSpecs.append( listToArray( urlDecode( url.testMethod ) ), true );
// The `url` scope only exists in a real HTTP request - see the identical guard in runRaw().
if ( !variables.IS_CLI ) {
if ( structKeyExists( url, "testBundles" ) && !isNull( url.testBundles ) ) {
arguments.testBundles.append( listToArray( urlDecode( url.testBundles ) ), true );
}
if ( structKeyExists( url, "testSuites" ) && !isNull( url.testSuites ) ) {
arguments.testSuites.append( listToArray( urlDecode( url.testSuites ) ), true );
}
if ( structKeyExists( url, "testSpecs" ) && !isNull( url.testSpecs ) ) {
arguments.testSpecs.append( listToArray( urlDecode( url.testSpecs ) ), true );
}
if ( structKeyExists( url, "testMethod" ) && !isNull( url.testMethod ) ) {
arguments.testSpecs.append( listToArray( urlDecode( url.testMethod ) ), true );
}
}

var filterState = new testbox.system.TestResult(
Expand Down
Loading