private void sendTestDetail(String tag, PrintStream ps) throws IOException {
ArrayList data, titles;
tag = tag.substring(tag.indexOf("@")+1,tag.length());
tag = URLDecoder.decode(tag,ENCODING);
TestSpecification test = getParent().getTestTree().getTestSpecification(tag);
String fileName;
if (test!=null) {
writeH1(ps, Resources.getString("testName")+":"+test.getTestName());
// test name, author & detail table
titles = new ArrayList();
data = new ArrayList();
titles.add(Resources.getString("testDescription"));
titles.add(Resources.getString("testAuthor"));
titles.add(Resources.getString("testBugInfo"));
data.add(test.getTestDescription());
data.add(test.getTestAuthor());
data.add(test.getTestBugInfo());
tabulate("",titles,data,testOutputTableTitleCol,testOutputTableCol,ps);
writeHr(ps);
// "run this" command table
data.clear();
fileName = URLEncoder.encode(test.getTestSpecPath(),ENCODING);
data.add("<A HREF=\"RUNTHIS@"+fileName+"\">"+Resources.getString("runNode")+"</A>");
simpleTable(data,commandTableCol,data.size(),ps);
writeHr(ps);
// output command table
String commandList[] = test.getViewOutputList();
titles.clear();
titles.add("Command");
titles.add(Resources.getString("environment"));
titles.add(Resources.getString("standardOutput"));
titles.add(Resources.getString("standardError"));
data.clear();
String tempFileName;
for (int i = 0; i < commandList.length; i++) {
data.add(commandList[i]);
tempFileName = test.getEnvironmentTraceFileName(getParent().getProjectResultsDirectory(),commandList[i]);
tempFileName = URLEncoder.encode(tempFileName,ENCODING);
data.add("<A HREF=\""+FILEDETAIL+tempFileName+"\">"+
commandList[i]+" "+Resources.getString("environment")+"</A>");
tempFileName = test.getStdOutTraceFileName(getParent().getProjectResultsDirectory(),commandList[i]);
tempFileName = URLEncoder.encode(tempFileName,ENCODING);
data.add("<A HREF=\""+FILEDETAIL+tempFileName+"\">"+
commandList[i]+" "+Resources.getString("standardOutput")+"</A>");
tempFileName = test.getStdErrTraceFileName(getParent().getProjectResultsDirectory(),commandList[i]);
tempFileName = URLEncoder.encode(tempFileName,ENCODING);
data.add("<A HREF=\""+FILEDETAIL+tempFileName+"\">"+
commandList[i]+" "+Resources.getString("standardError")+"</A>");
}
tabulate("",titles,data,testOutputTableTitleCol,testOutputTableCol,ps);
writeLn(ps);
// parser output table
titles.clear();
titles.add(Resources.getString("parserOutput"));
data.clear();
data.add(getFileContents(test.getParserTraceFileName(getParent().getProjectResultsDirectory())));
tabulate("",titles,data,parserOutputTableTitleCol,parserOutputTableCol,ps);
writeLn(ps);
// properties include table
titles.clear();
titles.add(Resources.getString("propIncludes"));
data.clear();
String dataA[] = test.getIncludePropList();
for (int i = 0; i < dataA.length; i++) {
fileName = URLEncoder.encode(dataA[i],ENCODING);
data.add("<A HREF=\""+FILEDETAIL+fileName+"\">"+dataA[i]+"</A>");
}
tabulate("",titles,data,includesTableTitleCol,includesTableCol,ps);
writeLn(ps);
// misc include table
titles.clear();
titles.add(Resources.getString("miscIncludes"));
data.clear();
dataA = test.getIncludeMiscList();
for (int i = 0; i < dataA.length; i++) {
fileName = URLEncoder.encode(dataA[i],ENCODING);
data.add("<A HREF=\""+FILEDETAIL+fileName+"\">"+dataA[i]+"</A>");
}
tabulate("",titles,data,includesTableTitleCol,includesTableCol,ps);
writeLn(ps);
// keywords table
titles.clear();
titles.add(Resources.getString("keyword"));
dataA = test.getKeyWords();
tabulate("",titles,arrayToArrayList(test.getKeyWords()),includesTableTitleCol,includesTableCol,ps);
writeLn(ps);
// write the test status
titles.clear();
data.clear();
titles.add(Resources.getString("testStatus"));
data.add(test.getStatusString());
// switch (test.getStatus()) {
// case ProtocolConstants.PASSED :
// simpleTable(data,passedCol,2,ps);
// break;
// case ProtocolConstants.FAILED :