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 ms...@apache.org on 2005/04/18 22:21:12 UTC
cvs commit: jakarta-jmeter/src/components/org/apache/jmeter/config CSVDataSetResources.properties
mstover1 2005/04/18 13:21:12
Modified: src/core/org/apache/jmeter/services FileServer.java
src/core/org/apache/jmeter/gui/action Save.java
bin jmeter.properties
src/core/org/apache/jmeter/samplers
SampleSaveConfiguration.java
src/components/org/apache/jmeter/config
CSVDataSetResources.properties
Log:
Allow option to save test plans to old file format
Fixing minor resource problem in CSVDataSet
some documentation in FileServer
Revision Changes Path
1.6 +9 -2 jakarta-jmeter/src/core/org/apache/jmeter/services/FileServer.java
Index: FileServer.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/services/FileServer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FileServer.java 13 Feb 2005 14:16:46 -0000 1.5
+++ FileServer.java 18 Apr 2005 20:21:11 -0000 1.6
@@ -27,8 +27,15 @@
/**
* @author mstover
*
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
+ * The point of this class is to provide thread-safe access to files, and to provide
+ * some simplifying assumptions about where to find files and how to name them. For instance,
+ * putting supporting files in the same directory as the saved test plan file allows users
+ * to refer to the file with just it's name - this FileServer class will find the file without
+ * a problem. Eventually, I want all in-test file access to be done through here, with the goal
+ * of packaging up entire test plans as a directory structure that can be sent via rmi to
+ * remote servers (currently, one must make sure the remote server has all support files in
+ * a relative-same location) and to package up test plans to execute on unknown boxes that
+ * only have Java installed.
*/
public class FileServer
{
1.25 +13 -4 jakarta-jmeter/src/core/org/apache/jmeter/gui/action/Save.java
Index: Save.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/gui/action/Save.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- Save.java 19 Oct 2004 20:08:19 -0000 1.24
+++ Save.java 18 Apr 2005 20:21:11 -0000 1.25
@@ -19,6 +19,7 @@
package org.apache.jmeter.gui.action;
import java.awt.event.ActionEvent;
+import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
@@ -34,6 +35,7 @@
import org.apache.jmeter.gui.GuiPackage;
import org.apache.jmeter.gui.tree.JMeterTreeNode;
import org.apache.jmeter.gui.util.FileDialoger;
+import org.apache.jmeter.save.OldSaveService;
import org.apache.jmeter.save.SaveService;
import org.apache.jmeter.services.FileServer;
import org.apache.jmeter.testelement.TestElement;
@@ -153,8 +155,15 @@
Writer writer = null;
try
{
- writer = new FileWriter(updateFile);
- SaveService.saveTree(subTree,writer);
+ if(JMeterUtils.getPropDefault("file_format","2.1").equals("2.0"))
+ {
+ OldSaveService.saveSubTree(subTree,new FileOutputStream(updateFile));
+ }
+ else
+ {
+ writer = new FileWriter(updateFile);
+ SaveService.saveTree(subTree,writer);
+ }
}
catch (Throwable ex)
{
1.117 +7 -3 jakarta-jmeter/bin/jmeter.properties
Index: jmeter.properties
===================================================================
RCS file: /home/cvs/jakarta-jmeter/bin/jmeter.properties,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -r1.116 -r1.117
--- jmeter.properties 2 Apr 2005 23:17:56 -0000 1.116
+++ jmeter.properties 18 Apr 2005 20:21:12 -0000 1.117
@@ -24,6 +24,10 @@
# Netscape HTTP Cookie file
cookies=cookies
+#File format for saved test files. JMeter 2.1 uses a new format. Set value to 2.0 to save to old
+# format
+#file_format=2.0
+
# Authorization
authorization=authorization
@@ -45,10 +49,10 @@
#The location of the truststore (trusted certificates) and keystore ( if other than the default.
#you can uncomment this and change the path to the correct location.
#javax.net.ssl.trustStore=/path/to/cacerts
-#javax.net.ssl.keyStore=/path/to/keystore
+javax.net.ssl.keyStore=/usr/java/jdk1.5.0_02/jre/lib/security/cacerts
#The password to your keystore
-#javax.net.ssl.keyStorePassword=password
+javax.net.ssl.keyStorePassword=changeit
#Alternative protocol of the ssl provider for IAIK JCE + iSaSiLk
#You can also override IAIK specific Providers as well.
1.3 +1 -1 jakarta-jmeter/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java
Index: SampleSaveConfiguration.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/samplers/SampleSaveConfiguration.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SampleSaveConfiguration.java 23 Mar 2005 01:16:32 -0000 1.2
+++ SampleSaveConfiguration.java 18 Apr 2005 20:21:12 -0000 1.3
@@ -206,7 +206,7 @@
_label =
TRUE.equalsIgnoreCase(props.getProperty(SAVE_LABEL_PROP, TRUE));
- _code = // TODO is this correct?
+ _code = // TODO is this correct? - yes
TRUE.equalsIgnoreCase(
props.getProperty(SAVE_RESPONSE_CODE_PROP, TRUE));
1.3 +2 -2 jakarta-jmeter/src/components/org/apache/jmeter/config/CSVDataSetResources.properties
Index: CSVDataSetResources.properties
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/components/org/apache/jmeter/config/CSVDataSetResources.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CSVDataSetResources.properties 8 Apr 2005 23:43:28 -0000 1.2
+++ CSVDataSetResources.properties 18 Apr 2005 20:21:12 -0000 1.3
@@ -4,5 +4,5 @@
filename.shortDescription=Name of the file (within your supporting file directory) that holds cvs data
variableNames.displayName=Variable Names (comma-delimited)
variableNames.shortDescription=List your variable names in order to match the order of columns in your csv data. Separate by commas.
-delimiter.displayName=Delimiter (use \t for tab)
-delimiter.shortDescription=Enter the delimiter (\t for tab)
\ No newline at end of file
+delimiter.displayName=Delimiter (use '\\t' for tab)
+delimiter.shortDescription=Enter the delimiter ('\\t' for tab)
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org