how to pass user properties file to JMETER through commant prompt - properties

I am using JMETER for load testing. I have large number of user properties in my plan. Its not recommended to pass all these through command prompt because of size issues. I am aware that we can put all the properties in some .properties file and use that file. Like we have the user.properties file in JMETER. But I want to make my own properties file and it should be loaded after the jmeter.properties file. Can anyone guide me how I can do that.
I have gone through a link
http://www.testautomationguru.com/jmeter-property-file-reader-a-custom-config-element/
But not getting how are the following steps to be done
Download this zip file which contains a jar file.
tag-jmeter-extn-1.0.zip (784 downloads)
Go to JMETER_HOME/lib/ext foler.
Place the jar file & Restart JMeter.
Once yo launch the JMeter, You will see ‘Property File Reader’ as given below.
Thankyou

I created the plugin. Did you place the jar file in the /lib/ext folder?
If yes, then close the jmeter and launch again. Under Config Elements - you would see Property File Reader. Give the path of the property file to be read.
You can add as many Property File Reader elements as you want for each property file.
If you do not want to use any external plugin, you can simply pass the property files to the test as shown below.
jmeter -n -t test.jmx -p c/path/to/prop.properties
The main idea of using the plugin is to read the user property file during the design phase/GUI as well. Property File Reader will work in both GUI/non-GUI modes.

Related

Create new log file each application run in IntelliJ

I know how to create a log with IntelliJ for run configurations, but is it possible to have the name of the file change dynamically each run? The documentation links to Apache Ant for patterns, but as far as I can tell, this is only used to determine which files should be watched and output to the log file.
What I would like is something like:
Save console output to file: /path/to/log/location/logForProject_${current-time}.log

How to set the user define path for log/output/report file of robot framework on command line

I am using robot framework with pycharm.
I am running all the tests of my folder using
testfolder>robot .
I want to set the path of log/output/report file to my customized location.
I have change the path of screenshot as D:/Screenshot folder in my variables.robot.
But How to set the path for mentioned file?
I also wanted to know
What is the common to run on terminal/cmd to run all the scripts of same folder with defined log file path?
Robot Framework User Guide walks you through the Basic Usage in quite good detail. Additionally the same document contains a section for the Different Command Line Options Available where you can get quite good picture on the options you have available.
Specifically --outputdir or -d will make Robot to save Log.html, Report.html and output.xml to the specified folder.
As mentioned by #Morkkis, the -d or --outputdir would do the trick. Also, it works for both command line and PyCharm Arguments field
For the screenshots, you could use the screenshot_directory command line argument. Please, check the Keyworkd documentation for more details ScreenShot Library Documentation
Also, for the report/logs file location, you can use these variables:
${LOG LEVEL} Current log level.
${OUTPUT FILE} An absolute path to the output file.
${LOG FILE} An absolute path to the log file or string NONE when no log file is created.
${REPORT FILE} An absolute path to the report file or string NONE when no report is created.
${DEBUG FILE} An absolute path to the debug file or string NONE when no debug file is created.
${OUTPUT DIR} An absolute path to the output directory.

Flowgear access to files on the local file system

I am creating a Flowgear workflow that needs to process a raft of XML data.
I have the xml data contained in a set of .xml files (approximately 400 files) in a folder on my local machine hard-drive and I want to read them into a workflow, run an XSLT transform and then write out the resultant XML to another folder on the same local hard-drive.
How do I get the flowgear workflow to read these files?
It depends on the use case, the File Enumerator works exceptionally well to loop (as in for-each) through each file. Sometimes, one wants to get a list of files in a particular folder and check whether a file has been found or not. For this, I would recommend a c# script to get a list of files with code:
Directory.GetFiles(#"{FilePath}", "*.{extension}", SearchOption.TopDirectoryOnly);
Further on, use the File node to read, write, or delete files from a file directory.
NB! You will need to install a DropPoint on the PC/Server to allow access to the files. For more information regarding Drop Points, please click here
You can use a File Enumerator or File Watcher to read the files up. The difference is that a File Enumerator will enumerate all files in a folder once, the File Watcher will watch a folder indefinitely and provide new files to the workflow as they are copied into the folder.
You can then use the File node to write the files back the the file system.

How to automatically upload compiled coffeescript files in Intellij IDEA?

I use automatic deploy through FTP. Everything worked well until I started to use coffeescript and its filewatcher feature which recompiles my .coffee file into .js file on every change.
Problem is that IDEA don't want to upload these compiled files like others. So I have manually press hotkey to upload compiled file after every change, which I want to see on the server.
How can I do it more convenient to use?
There is an option to upload external changes automatically.
Right now IDEA will not perform synchronization after file watcher is invoked, so you will need to do File | Synchronize, IDE will detect the changes and upload them.
Next update will have an option for the file watcher to perform synchronization after execution as the result of addressing this feature request.
this feature request concerns to a possibility to synchronize all files in output directory on every change (required by some transpilers). But, AFAIK, this is not the case for CoffeeScript compiler - synchronization should work there. Do the generated js files appear in the Project View as soon as the compilation completes, or do you have to synchronize the view manually to see changes? In the latter case something must be wrong with file watcher configuration (output path set incorrectly, for example). If files are synchronized correctly, setting 'upload external changes' option should do the thing

How can I write into a file within an Eclipse bundle?

I have an xml configuration file located into my plugin resources. I want to update this file whenever in the plugin happens some event. I found some methods to find and read the contents of a file located my plugin classpath, but I'm looking for a way to write into such a file.
Is there any way?
Many thanks.
That location (the install directory) is intended to be read-only since it may be shared in a network install scenario. I suggest you instead write the XML file to your plugin's state location which is intended for just this purpose:
String path = Activator.getDefault().getStateLocation().toString();
I should add that this gives you a fully qualified path to the directory created by Eclipse for any files your plugin wants to store. This directory is unique to your plugin.