<%@ page import="org.apache.beehive.netui.tools.testrecorder.shared.config.TestDefinitions, org.apache.beehive.netui.tools.testrecorder.server.TestRecorderFilter, org.apache.beehive.netui.tools.testrecorder.shared.config.WebappConfig, org.apache.beehive.netui.tools.testrecorder.shared.config.Category, org.apache.beehive.netui.tools.testrecorder.shared.config.Categories, org.apache.beehive.netui.tools.testrecorder.shared.config.TestDefinition, org.apache.beehive.netui.tools.testrecorder.shared.Constants, org.apache.beehive.netui.tools.testrecorder.shared.util.DateHelper, java.io.File, java.util.Calendar, java.util.Date, java.util.List"%> <% Calendar calendar = Calendar.getInstance(); Date date = null; TestDefinitions tests = TestRecorderFilter.instance().getTestDefinitions(); WebappConfig webapp = TestRecorderFilter.instance().getWebapp(); String categoryString = request.getParameter( "category"); Category category = tests.getCategories().getCategory( categoryString ); List testList = tests.getCategories().getTests( category ); TestDefinition test = null; String detailHref = null; String recordHref = null; String playbackHref = null; String diffHref = null; File file = null; %> Category Test Information <% if ( category == null ) { %> Unable to find category( <%=categoryString%> ) <% return; } %> <% for ( int i = 0; i < testList.size(); i++ ) { test = (TestDefinition) testList.get( i ); file = new File( test.getTestFilePath() ); if ( file.exists() ) { calendar.setTimeInMillis( file.lastModified()); date = calendar.getTime(); recordHref = new String( "" + test.getName() + " Record File" ); detailHref = new String( "" + test.getName() + " Details" ); } else { recordHref = " "; detailHref = "file not found( " + file.getAbsolutePath() + " )"; } file = new File( test.getResultFilePath() ); if ( file.exists() ) { calendar.setTimeInMillis( file.lastModified()); date = calendar.getTime(); playbackHref = new String( "" + test.getName() + " Playback File (" + DateHelper.formatToReadableString(date) + ")"); } else { playbackHref = " "; } file = new File( test.getResultDiffFilePath() ); if ( file.exists() ) { diffHref = new String( "" + test.getName() + ""); } else { diffHref = " "; } %> <% } %>
Test Details Diff Record File Playback File
<%=test.getName()%> <%=detailHref%> <%=diffHref%> <%=recordHref%> <%=playbackHref%>