You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2007/03/04 04:37:37 UTC
svn commit: r514346 -
/jakarta/jmeter/branches/rel-2-2/test/src/org/apache/jmeter/gui/action/TestLoad.java
Author: sebb
Date: Sat Mar 3 19:37:36 2007
New Revision: 514346
URL: http://svn.apache.org/viewvc?view=rev&rev=514346
Log:
Fix up another test
Modified:
jakarta/jmeter/branches/rel-2-2/test/src/org/apache/jmeter/gui/action/TestLoad.java
Modified: jakarta/jmeter/branches/rel-2-2/test/src/org/apache/jmeter/gui/action/TestLoad.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/test/src/org/apache/jmeter/gui/action/TestLoad.java?view=diff&rev=514346&r1=514345&r2=514346
==============================================================================
--- jakarta/jmeter/branches/rel-2-2/test/src/org/apache/jmeter/gui/action/TestLoad.java (original)
+++ jakarta/jmeter/branches/rel-2-2/test/src/org/apache/jmeter/gui/action/TestLoad.java Sat Mar 3 19:37:36 2007
@@ -40,8 +40,8 @@
}
public void setUp() {
- testFile1 = // TODO: not used - why?
- new File(System.getProperty("user.dir") + "/testfiles", "Test Plan.jmx");
+// testFile1 = // Old-style format; no longer used
+// new File(System.getProperty("user.dir") + "/testfiles", "Test Plan.jmx");
testFile2 = // TODO: not used - why?
new File(System.getProperty("user.dir") + "/testfiles", "Modification Manager.jmx");
testFile3 = new File(System.getProperty("user.dir") + "/testfiles", "proxy.jmx");
@@ -54,8 +54,17 @@
testFile10 = new File(System.getProperty("user.dir") + "/testfiles", "OnceOnlyTestPlan.jmx");
testFile11 = new File(System.getProperty("user.dir") + "/testfiles", "ProxyServerTestPlan.jmx");
testFile12 = new File(System.getProperty("user.dir") + "/testfiles", "SimpleTestPlan.jmx");
- testFile13 = // TODO: not used - why?
- new File(System.getProperty("user.dir") + "/testfiles", "URLRewritingExample.jmx");
+ // Incomplete file
+// testFile13 =
+// new File(System.getProperty("user.dir") + "/testfiles", "URLRewritingExample.jmx");
+ }
+
+// public void testFile1() throws Exception {
+// assertTree(getTree(testFile1));
+// }
+
+ public void testFile2() throws Exception {
+ assertTree(getTree(testFile2));
}
public void testFile3() throws Exception {
@@ -63,7 +72,10 @@
}
private void assertTree(HashTree tree) throws Exception {
- assertTrue(tree.getArray()[0] instanceof org.apache.jmeter.testelement.TestPlan);
+ final Object object = tree.getArray()[0];
+ if (! (object instanceof org.apache.jmeter.testelement.TestPlan)){
+ fail("Hash tree should be TestPlan, but is "+object.getClass().getName());
+ }
}
public void testFile4() throws Exception {
@@ -101,6 +113,10 @@
public void testFile12() throws Exception {
assertTree(getTree(testFile12));
}
+
+// public void testFile13() throws Exception {
+// assertTree(getTree(testFile13));
+// }
private HashTree getTree(File f) throws Exception {
HashTree tree = SaveService.loadTree(new FileInputStream(f));
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org