morgand 01/08/29 16:16:48 Modified: latka-webapp/webapp RunTestURI.jsp TestMenu.jsp index.jsp Added: latka-webapp/webapp ProcessTest.jsp TestForm.jsp Log: stubbed out logic to find variables in an unprocessed suite Revision Changes Path 1.2 +0 -1 jakarta-commons-sandbox/latka-webapp/webapp/RunTestURI.jsp Index: RunTestURI.jsp =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/latka-webapp/webapp/RunTestURI.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RunTestURI.jsp 2001/08/29 16:54:58 1.1 +++ RunTestURI.jsp 2001/08/29 23:16:47 1.2 @@ -4,7 +4,6 @@ <% Properties props = (Properties) session.getAttribute("latka.sessionProperties"); String fileName = request.getParameter("testFile"); - fileName = props.getProperty("latka.testDir") + "/" + fileName; %> <pre> <latka:executeSuite testFile="<%= fileName %>"/> 1.3 +6 -5 jakarta-commons-sandbox/latka-webapp/webapp/TestMenu.jsp Index: TestMenu.jsp =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/latka-webapp/webapp/TestMenu.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TestMenu.jsp 2001/08/29 16:54:58 1.2 +++ TestMenu.jsp 2001/08/29 23:16:47 1.3 @@ -23,9 +23,9 @@ <p> <form action="SetTestDir.jsp"> - Reading tests from directory: <b><%= testDir %></b> - <input type="text" name="testDir"> - <input type="submit" value="Set Test Directory"> + Test directory: + <input type="text" name="testDir" value="<%= testDir %>"> + <input type="submit" value="Set New Test Directory"> </form> </p> @@ -33,8 +33,9 @@ <latka:listTests id="files" testDir="<%= testDir %>"/> <% for (int i = 0; i < files.length; ++i) { %> - <form action="RunTestURI.jsp" method="post"> - <input type="hidden" name="testFile" value="<%= files[i].getName() %>"> + <% String fileName = props.getProperty("latka.testDir") + "/" + files[i].getName(); %> + <form action="ProcessTest.jsp" method="post"> + <input type="hidden" name="testFile" value="<%= fileName %>"> <input type="submit" value="Run Test"> <%= files[i].getName() %> </form> 1.3 +1 -1 jakarta-commons-sandbox/latka-webapp/webapp/index.jsp Index: index.jsp =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/latka-webapp/webapp/index.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- index.jsp 2001/08/28 21:16:15 1.2 +++ index.jsp 2001/08/29 23:16:47 1.3 @@ -2,7 +2,7 @@ <p> <a href="TestMenu.jsp">List of existing tests</a><br> - <a href="RunTest.jsp">Run a test manually</a> + <a href="TestForm.jsp">Run a test manually</a> </p> <p><a href="help/index.jsp"></a><u>Help</u></p> 1.1 jakarta-commons-sandbox/latka-webapp/webapp/ProcessTest.jsp Index: ProcessTest.jsp =================================================================== <%@ page import="java.util.Set,java.util.Iterator" %> <%@ taglib uri="http://jakarta.apache.org/taglibs/latka-taglib" prefix="latka" %> <%-- this logic needs to be less gross-looking --%> <% String testFile = request.getParameter("testFile"); if (testFile != null) { %> <latka:findVariables id="set" testFile="<%= testFile %>"/> <% } else { %> <latka:findVariables id="set"> <%= request.getParameter("latkaTest") %> </latka:findVariables> <% } Set set = (Set) pageContext.getAttribute("set"); Iterator i = set.iterator(); while (i.hasNext()) { %> VarName: <%= i.next() %> <% } %> 1.1 jakarta-commons-sandbox/latka-webapp/webapp/TestForm.jsp Index: TestForm.jsp =================================================================== <h2>Run a Latka test</h2> <form method="post" action="ProcessTest.jsp"> <textarea NAME="latkaTest" ROWS="18" COLS="70"> <?xml version="1.0"?> <suite defaultHost="localhost" defaultPort="8080" label="Latka self-diagnostics"> <!-- this XML is here temporarily for debugging purposes --> <request path="<%= request.getContextPath() %>/index.jsp" label="basic test"> <validate> <regexp pattern="Run a test manually"/> </validate> </request> <request path="/thisTestWillFail.jsp" label="a missing file"> <validate> <statusCode/> </validate> </request> </suite> </textarea> <br> <input type="submit"> </form>