-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from Ortus-Solutions/development
v6.0.0
- Loading branch information
Showing
91 changed files
with
3,173 additions
and
1,624 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Daily Test BE Engines | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Runs at 00:00 UTC every day | ||
|
||
jobs: | ||
tests: | ||
uses: ./.github/workflows/tests.yml | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"program": "${command:CommandBox.startDebugServer}", | ||
"name": "Debug CommandBox", | ||
"type": "boxlang", | ||
"request": "attach", | ||
// make sure this is the same value you configured your server with | ||
"serverPort": 8888 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env boxlang | ||
|
||
// Go baby go! | ||
new testbox.system.runners.BoxLangRunner().main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Call the Runner | ||
boxlang testbox/system/runners/BoxLangRunner.bx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name":"TestBox", | ||
"version":"5.4.0", | ||
"version":"6.0.0", | ||
"location":"https://downloads.ortussolutions.com/ortussolutions/testbox/@build.version@/[email protected]@.zip", | ||
"author":"Ortus Solutions <[email protected]>", | ||
"slug":"testbox", | ||
|
@@ -56,11 +56,9 @@ | |
"format:check":"cfformat check system/**/*.cfc,test-harness/**/*.cfc,tests/specs/**/*.cfc ./.cfformat.json", | ||
"format:watch":"cfformat watch system/**/*.cfc,test-harness/**/*.cfc,tests/specs/**/*.cfc ./.cfformat.json", | ||
"start:lucee":"server start [email protected]", | ||
"start:2018":"server start [email protected]", | ||
"start:2021":"server start [email protected]", | ||
"start:2023":"server start [email protected]", | ||
"log:lucee":"server log testbox-lucee@5 --follow", | ||
"log:2018":"server log testbox-adobe@2018 --follow", | ||
"log:2021":"server log testbox-adobe@2021 --follow", | ||
"log:2023":"server log testbox-adobe@2023 --follow" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright Since 2005 Ortus Solutions, Corp | ||
* www.ortussolutions.com | ||
* ************************************************************************************* | ||
*/ | ||
class { | ||
this.name = "Test Browser"; | ||
|
||
// The mapping to easily access the tests | ||
this.mappings[ "/tests" ] = getDirectoryFromPath( getCurrentTemplatePath() ); | ||
// The mapping to easily access the root application usually the parent folder | ||
this.mappings[ "/root" ] = expandPath( "/../" ); | ||
|
||
// Any application settings go here | ||
|
||
/** | ||
* Executes BEFORE any runner or test requested. | ||
*/ | ||
boolean function onRequestStart( String targetPage ){ | ||
return true; | ||
} | ||
|
||
/** | ||
* Executes AFTER any runner or test requested. | ||
*/ | ||
void function onRequestEnd( String targetPage ){ | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
<bx:script> | ||
// GLOBAL VARIABLES | ||
ASSETS_DIR = expandPath( "/testbox/system/reports/assets" ); | ||
TESTBOX_VERSION = new testBox.system.TestBox().getVersion(); | ||
// TEST LOCATIONS -> UPDATE AS YOU SEE FIT | ||
rootMapping = "/tests/"; | ||
|
||
// Local Variables | ||
rootPath = expandPath( rootMapping ); | ||
targetPath = rootPath; | ||
|
||
// Incoming Navigation | ||
param name="url.path" default=""; | ||
if( len( url.path ) ){ | ||
targetPath = getCanonicalPath( rootpath & "/" & url.path ); | ||
// Avoid traversals, reset to root | ||
if( !findNoCase( rootpath, targetPath ) ){ | ||
targetPath = rootpath; | ||
} | ||
} | ||
|
||
// Get the actual execution path | ||
executePath = rootMapping & ( len( url.path ) ? "/#url.path#" : "/" ); | ||
// Execute an incoming path | ||
if( !isNull( url.action ) ){ | ||
if( directoryExists( targetPath ) ){ | ||
writeOutput( "#new testbox.system.TestBox( directory=executePath ).run()#" ); | ||
} else { | ||
writeOutput( "<h2>Invalid Directory: #encodeForHTML( targetPath )#</h2>" ); | ||
} | ||
abort; | ||
} | ||
|
||
// Get the tests to navigate | ||
qResults = directoryList( targetPath, false, "query", "", "name" ); | ||
|
||
// Calculate the back navigation path | ||
if( len( url.path ) ){ | ||
backPath = url.path.listToArray( "/\" ); | ||
backPath.pop(); | ||
backPath = backPath.toList( "/" ); | ||
} | ||
</bx:script> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="generator" content="TestBox v#TESTBOX_VERSION#"> | ||
<title>TestBox Browser</title> | ||
<bx:output> | ||
<style>#fileRead( '#ASSETS_DIR#/css/main.css' )#</style> | ||
<script>#fileRead( '#ASSETS_DIR#/js/jquery-3.3.1.min.js' )#</script> | ||
<script>#fileRead( '#ASSETS_DIR#/js/popper.min.js' )#</script> | ||
<script>#fileRead( '#ASSETS_DIR#/js/bootstrap.min.js' )#</script> | ||
<script>#fileRead( '#ASSETS_DIR#/js/stupidtable.min.js' )#</script> | ||
</bx:output> | ||
</head> | ||
<bx:output> | ||
<body> | ||
|
||
<div id="tb-runner" class="container"> | ||
|
||
<!--- Header ---> | ||
<div class="row"> | ||
<div class="col-md-4 text-center mx-auto"> | ||
<img class="mt-3" src="http://www.ortussolutions.com/__media/testbox-185.png" alt="TestBox" id="tb-logo"/> | ||
<br> | ||
v#TESTBOX_VERSION# | ||
<br> | ||
<a | ||
href="index.cfm?action=runTestBox&path=#URLEncodedFormat( url.path )#" | ||
target="_blank" | ||
> | ||
<button | ||
class="btn btn-primary btn-sm my-1" | ||
type="button"> | ||
Run All | ||
</button> | ||
</a> | ||
</div> | ||
</div> | ||
|
||
<!--- Runners ---> | ||
<div class="row"> | ||
<div class="col-md-12 mb-4"> | ||
<h2>Availble Test Runners: </h2> | ||
<p> | ||
Below is a listing of the runners matching the "runner*.(cfm|bxm)" pattern. | ||
</p> | ||
|
||
<bx:set runners = directoryList( targetPath, false, "query", "runner*.cfm|runner*.bxm" )> | ||
<bx:if runners.recordCount eq 0> | ||
<p class="alert alert-warning">No runners found in this directory</p> | ||
<bx:else> | ||
<bx:loop query="runners"> | ||
<a | ||
href="#runners.name#" | ||
target="_blank" | ||
<bx:if listLast( runners.name, "." ) eq "bxm"> | ||
class="btn btn-success btn-sm my-1 mx-1" | ||
<bx:else> | ||
class="btn btn-info btn-sm my-1 mx-1" | ||
</bx:if> | ||
> | ||
#runners.name# | ||
</a> | ||
</bx:loop> | ||
</bx:if> | ||
</div> | ||
</div> | ||
|
||
<!--- Listing ---> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<form name="runnerForm" id="runnerForm"> | ||
<input type="hidden" name="opt_run" id="opt_run" value="true"> | ||
<h2>TestBox Test Browser: </h2> | ||
<p> | ||
Below is a listing of the files and folders starting from your root <code>#rootMapping#</code>. You can click on individual tests in order to execute them | ||
or click on the <strong>Run All</strong> button on your left and it will execute a directory runner from the visible folder. | ||
</p> | ||
|
||
<fieldset> | ||
<legend>#targetPath.replace( rootPath, "" )#</legend> | ||
|
||
<!--- Show Back If we are traversing ---> | ||
<bx:if len( url.path )> | ||
<a href="index.bxm?path=#URLEncodedFormat( backPath )#"> | ||
<button type="button" class="btn btn-secondary btn-sm my-1">&##xAB; Back</button> | ||
</a> | ||
<br> | ||
<hr> | ||
</bx:if> | ||
|
||
<bx:loop query="qResults"> | ||
<!--- Skip . folder file names and runners and Application.bx, cfc---> | ||
<bx:if | ||
refind( "^\.", qResults.name ) | ||
OR | ||
( listLast( qresults.name, ".") eq "cfm" OR listLast( qresults.name, ".") eq "bxm" ) | ||
OR | ||
( qResults.name eq "Application.cfc" OR qResults.name eq "Application.bx" ) | ||
> | ||
<bx:continue> | ||
</bx:if> | ||
|
||
<bx:if qResults.type eq "Dir"> | ||
<a | ||
class="btn btn-secondary btn-sm my-1" | ||
href="index.bxm?path=#urlEncodedFormat( url.path & "/" & qResults.name )#" | ||
> | ||
&##x271A; #qResults.name# | ||
</a> | ||
<br /> | ||
<bx:elseif listLast( qresults.name, ".") eq "cfm" || listLast( qresults.name, ".") eq "bxm"> | ||
<a | ||
class="btn btn-primary btn-sm my-1" | ||
href="#executePath & "/" & qResults.name#" | ||
target="_blank" | ||
> | ||
#qResults.name# | ||
</a> | ||
<br /> | ||
<bx:elseif | ||
listLast( qresults.name, ".") eq "cfc" || listLast( qresults.name, ".") eq "bx" | ||
> | ||
<a | ||
<bx:if listLast( qresults.name, ".") eq "bx"> | ||
data-bx="true" | ||
class="btn btn-success btn-sm my-1" | ||
<bx:else> | ||
data-bx="false" | ||
class="btn btn-info btn-sm my-1" | ||
</bx:if> | ||
href="#executePath & "/" & qResults.name#?method=runRemote" | ||
target="_blank" | ||
> | ||
#qResults.name# | ||
</a> | ||
<br /> | ||
</bx:if> | ||
</bx:loop> | ||
</fieldset> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
</html> | ||
</bx:output> |
Oops, something went wrong.