https://bz.apache.org/bugzilla/show_bug.cgi?id=57913
Bug ID: 57913
Summary: Keep backups of last saved JMX files
Product: JMeter
Version: 2.12
Hardware: PC
Status: NEW
Severity: enhancement
Priority: P2
Component: Main
Assignee: [email protected]
Reporter: [email protected]
Created attachment 32725
--> https://bz.apache.org/bugzilla/attachment.cgi?id=32725&action=edit
Patch for backing JMX file when saving
After an OOME occured while saving my test plan, a significant part of it was
lost and made the whole work unusable without "handworking" the XML. Given that
no recent copy of my work was available to me anymore, I was really angry and
in bad situatio, lesson learnt : don't ever forget backing up your work.
I thus have brought some enhancement to the JMX save process so that it keeps a
copy istory of the last saved JMX.
What's more I am aware that this did happened to someone else so I come to the
conclusion that sharing it might be usefull to someone else.
The attached patch adds logic to the JMX save process so that the last saved
JMX file is copied with a timestamp suffix.
user.properties contains properties to control backup history :
# Enable backup history, defaults to true
# Set to false to return to the default behaviour
#jmeter.gui.action.save.backup_when_saving=true
# Set the max number of hours that existing backups are kept
# older backups are delete when a save operation occurs
# Default is keep backup for ever
#jmeter.gui.action.save.keep_backup_max_hours=0
# Set maximum number of backup to be kept
# Default is 10, so while we set no max_hours we only keep at most 10 backups
#jmeter.gui.action.save.keep_backup_max_count=10
Backup files are created in a subdirectory of the main JMX file and is named
from the JMX name suffixed with ".backups"
Example:
We are saving to an existing jmeter.jmx file in some /path/to directory , we'll
then have :
/path/to/jmeter.jmx
/path/to/jmeter.jmx.backups
where /path/to/jmeterx.jmx.backups will contains the backups history :
jmeter.jmx.20150502-180909
jmeter.jmx.20150502-180911
jmeter.jmx.20150502-180915
jmeter.jmx.20150502-180916
jmeter.jmx.20150502-180917
jmeter.jmx.20150502-180919
jmeter.jmx.20150502-180920
jmeter.jmx.20150502-180921
jmeter.jmx.20150502-180922
jmeter.jmx.20150502-180923
This would prevent anyone to lose work anymore...
Regards.
Benoit
--
You are receiving this mail because:
You are the assignee for the bug.