Bug 43283

Summary: Save action should add extension .jmx if not present
Product: JMeter - Now in Github Reporter: Alf Hogemark <alf>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P2    
Version: 2.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Suggested patch

Description Alf Hogemark 2007-09-02 04:16:11 UTC
I think the Save action in JMeter should add the ".jmx" file extension if the
user forgets to enter it when entering the file name.
If the user forgets to do so, he will not be able to load the file back in, but
has to change the name of the file first, to have the .jmx extension.

I also think the save action should prompt before overwriting an existing file,
when the user does a "save as".
Comment 1 Alf Hogemark 2007-09-02 04:18:22 UTC
Created attachment 20753 [details]
Suggested patch

The dialog when overwriting a file is optional, but I think the adding of the
jmx extension should be done.

Also, other code should probably be changed to use a string constant instead of
".jmx".
Comment 2 Sebb 2007-09-02 05:06:10 UTC
Good idea, but I think the extension should only be added if there is none.

It can be useful to save a copy of a file with a different extension - e.g. 
for use in the include controller.

I'll change the check accordingly.
Comment 3 Sebb 2007-09-02 05:46:09 UTC
Added to SVN in r571968.

I'll raise another bug regarding centralisation of .jmx, .jtl etc strings.
Comment 4 The ASF infrastructure team 2022-09-24 20:37:40 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1998