<commit_before><cfparam name="url.print_js_resources" type="boolean" default="true" />
<cfparam name="url.toggledebug" type="boolean" default="true" />
<cfparam name="url.action" type="string" default="none" />
<cfset currentDirectory= getDirectoryFromPath(getCurrentTemplatePath())>
<cfsetting requesttimeout="3600"><!-- 1 hour -->

<cfscript>
string function toPackage(string directory){
	var currentDirectory= getDirectoryFromPath(getCurrentTemplatePath());
	return replace(replace(replace(arguments.directory,currentDirectory,''),'\','.','all'),'/','.','all');
}
string function toName(string name){
	return mid(arguments.name,1,len(arguments.name)-4);
}


</cfscript>

<cfdirectory action="list" recurse="true"  sort="dateLastModified desc"  directory="./testcases" name="dir" filter="*.cfc">

<cfoutput>
<h1>Jira Tickets</h1>
<ul>
	<li><a href="index.cfm?action=all">Run all tickets</a></li>
	<li><a href="index.cfm?action=latest">Run latest 10 tickets</a></li>
	<ul>
		
	<cfloop query="#dir#" endrow="10">
		<cfset package=toPackage(dir.directory)>
		<cfset n=toName(dir.name)>
		<!---<cfif left(package,len("testcase-templates")) == "testcase-templates">
			<cfcontinue>
		</cfif>--->
		
		<li>
			<a href="index.cfm?action=single&testcase=#package#.#n#">Run #package#.#n#</a>
		</li>
	</cfloop>
	</ul>
	<li>
		<form action="index.cfm">Run
		<input type="hidden" name="action" value="single">
		<input type="text" name="ticket" value="<cfif isNull(url.ticket)>tickets.Jira<cfelse>#url.ticket#</cfif>">
		<input type="submit" name="submit" value="Go">
		</form>
	</li>
</ul>
</cfoutput>
<cfif url.action EQ "list">
	

</cfif>


<cfscript>
if(url.action != "none") {
	
	
	testSuite = new org.railo.cfml.test.RailoTestSuite();
	//testSuite.maxTheads(20);
	
	if(url.action == "single") {
		cfcName=url.testcase;
		cfc=createObject('component',cfcName);
		testSuite.addAll(cfcName,cfc);
	}<commit_msg>improve listing of testcase to supress components not iimplementing Testcase interface<commit_after><cfparam name="url.print_js_resources" type="boolean" default="true" />
<cfparam name="url.toggledebug" type="boolean" default="true" />
<cfparam name="url.action" type="string" default="none" />
<cfset currentDirectory= getDirectoryFromPath(getCurrentTemplatePath())>
<cfsetting requesttimeout="3600"><!-- 1 hour -->

<cfscript>
string function toPackage(string directory){
	var currentDirectory= getDirectoryFromPath(getCurrentTemplatePath());
	return replace(replace(replace(arguments.directory,currentDirectory,''),'\','.','all'),'/','.','all');
}
string function toName(string name){
	return mid(arguments.name,1,len(arguments.name)-4);
}


</cfscript>

<cfdirectory action="list" recurse="true"  sort="dateLastModified desc"  directory="./testcases" name="dir" filter="*.cfc">

<cfoutput>
<h1>Jira Tickets</h1>
<ul>
	<li><a href="index.cfm?action=all">Run all tickets</a></li>
	<li><a href="index.cfm?action=latest">Run latest 10 tickets</a></li>
	<ul>
	<cfset count=0>
	<cfloop query="#dir#">
		<cfset package=toPackage(dir.directory)>
		<cfset n=toName(dir.name)>
		<cfset meta=GetComponentMetadata("#package#.#n#")>
		<!---<cfif left(package,len("testcase-templates")) == "testcase-templates">
			<cfcontinue>
		</cfif>--->
		<cfif isDefined('meta.extends.fullname') and (meta.extends.fullname EQ "org.railo.cfml.test.RailoTestCase" or meta.extends.fullname EQ "mxunit.framework.TestCase")>
			<cfif ++count GT 10><cfbreak></cfif>
			<li>
				<a href="index.cfm?action=single&testcase=#package#.#n#">Run #package#.#n#</a>
				
			</li>
		</cfif>
		
	</cfloop>
	</ul>
	<li>
		<form action="index.cfm">Run
		<input type="hidden" name="action" value="single">
		<input type="text" name="ticket" value="<cfif isNull(url.ticket)>tickets.Jira<cfelse>#url.ticket#</cfif>">
		<input type="submit" name="submit" value="Go">
		</form>
	</li>
</ul>
</cfoutput>
<cfif url.action EQ "list">
	

</cfif>


<cfscript>
if(url.action != "none") {
	
	
	testSuite = new org.railo.cfml.test.RailoTestSuite();
	//testSuite.maxTheads(20);
	
	if(url.action == "single") {
		cfcName=url.testcase;
		cfc=createObject('component',cfcName);
		testSuite.addAll(cfcName,cfc);
	}
{'fraction_non_alphanumeric': 0.20331651045421772, 'fraction_numerical': 0.007450132179764479, 'mean_word_length': 5.994957983193277, 'pattern_counts': {'":': 0, '<': 110, '<?xml version=': 0, '>': 110, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1949399', 'n_tokens_mistral': 1615, 'n_tokens_neox': 1504, 'n_words': 256}