How can we remove the current date from gradle generated .html and .xml file while running JMeter script from build.gradle file? -
i running jmeter script build.gradle file. after executing generating html , xml report files script name. problem current date present script name. please tell me how remove current date output files.
gradle- gradle-2.4 version , html report publisher plugin in jenkins
i'm assuming you're using com.github.kulya/jmeter-gradle-plugin ?
the date tacked on testplan name while generating results, used while generating reports. intention believe results not overwritten each time run test. the way implemented, isn't configurable.
if have 1 set of result , report per jmx file, should able define new task though strip out date/timestamp results , report files.
task stripdatefromreport() { new file("build/jmeter-report").eachfilematch(~/.*.[xml|html]/){ file -> def m = file.getname() =~ /^(.*?)-[0-9]{8}-[0-9]{4}(.*?)$/ file.renameto(new file(file.getparentfile().getcanonicalpath()+ file.separator + m[0][1] + m[0][2])) } }
note: if have more 1 report different timestamp, fail because once dates removed filenames not unique anymore.
Comments
Post a Comment