Reputation: 806
How do i generate the results CSV ,jtl files automatically with the date and time format?
Basically what i am trying to looking for generating the Test results files CSV and jtl files automatically with the date and time stamp and pass that results file in the Graphs Generator , so that I don't need to keep modify the jmx files.If possible Graphs output folder also with the date and time stamp.
How do I achieve this?
please see the below screenshots
2017/04/05 16:07:49 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2017/04/05 16:07:49 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2017/04/05 16:07:49 ERROR - jmeter.engine.PreCompiler: invalid variables org.apache.jmeter.functions.InvalidVariableException: Expected } after __time function call in C:\JMETER\LR2JMeter\NGP\Results\NGP_PensionReport\PR_ViewResultsTable_${__time(YMDHS),}.csv at org.apache.jmeter.engine.util.FunctionParser.makeFunction(FunctionParser.java:139) at org.apache.jmeter.engine.util.FunctionParser.compileString(FunctionParser.java:82) at org.apache.jmeter.engine.util.CompoundVariable.setParameters(CompoundVariable.java:189) at org.apache.jmeter.engine.util.ReplaceStringWithFunctions.transformValue(ReplaceStringWithFunctions.java:46) at org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:170) at org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:80) at org.apache.jmeter.engine.PreCompiler.addNode(PreCompiler.java:78) at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:996) at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:997) at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:978) at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:306) at java.lang.Thread.run(Unknown Source)
Please advise me!
Thanks, Rajani
Upvotes: 5
Views: 13634
Reputation: 1202
Use below syntax to name your file. You can use this cheat sheet, if you want to change the format.
For more details about functions, please check this link.
${__time(MM-dd-yyyy-HH-mm-ss,)}
Upvotes: 11