Bug 61068 - Introduce property "resultcollector.action_if_file_exists" to control the popup "File already exists" when starting a test
Summary: Introduce property "resultcollector.action_if_file_exists" to control the pop...
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.2
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-04 08:16 UTC by orimarko
Modified: 2017-07-23 14:04 UTC (History)
1 user (show)



Attachments
Dialog asking to overwrite results will be shown on each run (8.14 KB, application/xml)
2017-05-20 14:59 UTC, Felix Schumacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description orimarko 2017-05-04 08:16:23 UTC
in jmeter 3.2 I started get a warning when running in GUI mode

for every file I write to there's a popup alert warning of file already exists

Please remove this warning or allow to choose remember my decision
Comment 1 Felix Schumacher 2017-05-20 14:40:19 UTC
Can you explain a bit more, when the popup occurs?
I think this bug is connected to 58164. The implemented solution right now for that bug is to use command line parameter "-f" to delete all files that would get written.
Comment 2 Philippe Mouawad 2017-05-20 14:42:43 UTC
Hi Felix,
In gui mode, if you have many view results tree, when starting test, a popup will trigger for every occurence.

Regards
Comment 3 Felix Schumacher 2017-05-20 14:59:11 UTC
Created attachment 34999 [details]
Dialog asking to overwrite results will be shown on each run

Ok, I see the dialog. I have attached a short test plan, that demonstrates the behaviour on the second run. It will display two dialogs - one after another - that ask how to continue with the result files.

Should we
a) add an option to pre-select a default behaviour?
b) add a gui option to remember the last selected behaviour for the next dialogs?
c) a) and b)?
Comment 4 Philippe Mouawad 2017-05-20 15:17:35 UTC
Hi Felix,
I think it's what you have in mind, but I thought writing it might help us find issues:

1/ add an option : 'remember my choice for the next popups of this run':
=> User checks the option and clicks his choice
JMeter remembers this behaviour for next popups

2a/ on next run, if user has checked the option, it is still checked and the button that he selected previously is focused, so enter key starts the test applying his choice

2b/ on next run if he hasn't checked the option, same bahaviour as 1/
Comment 5 mchassagneux 2017-05-20 18:09:56 UTC
Hi Felix, Philippe

For me, add a properties in jmeter.properties to disable the warning popup is  good enough because a check box to remember the decision has too much choice : for one run ? for on jmeter session ? all the time ? how rollback  this choose ? 
But it's as you wish, I can implement the fix as I push this commit first if you want too.
Comment 6 orimarko 2017-05-21 08:16:33 UTC
Behavior before 3.2 was to append to file by default

IMHO I think we should keep behavior as before, 

Append to file by default and allow for each listener to override file  

I think by adding another checkbox per listener - override file

If it's too much trouble I suggest a new property with override/append to prevent warning popup
Comment 7 Felix Schumacher 2017-05-21 09:57:57 UTC
(In reply to Philippe Mouawad from comment #4)
> Hi Felix,
> I think it's what you have in mind, but I thought writing it might help us
> find issues:
> 
> 1/ add an option : 'remember my choice for the next popups of this run':
> => User checks the option and clicks his choice
> JMeter remembers this behaviour for next popups
> 
Option 1 was - for me - add a property, that sets the default behaviour. That would be one of "append", "delete", "ask".


Option 2 was to ask the user the first time and give them an option to apply the currently used one for further decisions in that JMeter run.

> 2a/ on next run, if user has checked the option, it is still checked and the
> button that he selected previously is focused, so enter key starts the test
> applying his choice
> 
> 2b/ on next run if he hasn't checked the option, same bahaviour as 1/

Option 3 was a combination, where we could remember the choice by setting the property chosen in 1.
Comment 8 Felix Schumacher 2017-05-21 10:00:15 UTC
(In reply to maxime.chassagneux from comment #5)
> Hi Felix, Philippe
> 
> For me, add a properties in jmeter.properties to disable the warning popup
> is  good enough because a check box to remember the decision has too much
> choice : for one run ? for on jmeter session ? all the time ? how rollback 
> this choose ? 
> But it's as you wish, I can implement the fix as I push this commit first if
> you want too.

I think we should start by adding the property, that gets consulted before displaying the dialog to the user. If it is "ask", the dialog gets displayed, otherwise the action specified in the property will be chosen.
Comment 9 Philippe Mouawad 2017-07-23 13:57:53 UTC
Author: pmouawad
Date: Sun Jul 23 13:57:20 2017
New Revision: 1802724

URL: http://svn.apache.org/viewvc?rev=1802724&view=rev
Log:
Bug 61068 - Introduce property "resultcollector.action_if_file_exists" to control the popup "File already exists" when starting a test
Bugzilla Id: 61068

Modified:
    jmeter/trunk/bin/jmeter.properties
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/AbstractAction.java
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/usermanual/properties_reference.xml
Comment 10 Philippe Mouawad 2017-07-23 14:04:55 UTC
Author: pmouawad
Date: Sun Jul 23 14:04:17 2017
New Revision: 1802727

URL: http://svn.apache.org/viewvc?rev=1802727&view=rev
Log:
Bug 61068 - Introduce property "resultcollector.action_if_file_exists" to control the popup "File already exists" when starting a test
Mention property in popup
Bugzilla Id: 61068

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
Comment 11 The ASF infrastructure team 2022-09-24 20:38:08 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4384