auto test running too often.

Hi,
I am trying to use the autotest functionality but it runs too often. By this I mean that if I add a new character to a file and wait a few seconds autotest is triggered. I have not saved anything.

I have tried.

1. Deactivating "save on frame deactivation"
2. adding this to .autotest as described elsewhere in the community

Autotest.add_hook :initialize do |at|
  %w{.svn .hg .git vendor public log .idea}.each {|exception| at.add_exception(exception)}
end

I don't think this is the expected before. Is there anything else that needs to be deactivated. Is there autosave thing I am missing? Help appreciated.

Thanks
Colin McGowan

0
8 comments

Having dug further through some related topics I have found that this is an old issue that has not been fixed ( https://youtrack.jetbrains.com/issue/RUBY-7630 ).

From what I can gather Rubymine is constantly "auto-saving" in the background regardless of what the auto-save preferences are set to. This happens after approx 3 seconds of inactivity and triggers autotest.

It has been argued on those threads by the Jetbrains time that this is how it should work. The users on the thread disagreed. So do I.

It is ridiculous for autotest to run whenever there is 3 seconds of inactivity. It should only run on a manual save or according to the autosave preferences selected by the user. Having some hidden process over which there is no user control makes the autotest function unuseable. No doubt I will just have to go back to manual running

This is clearly a case where the IDE has overstepped the mark in taking control from the user.

Regards
Colin

1

Having dug even further I found the setting under the little gear wheal on the test run window that allows you to set the autotest delay. This defaults to 3 seconds so that is what is happening here. What's the maximum value? 10 seconds. Big whoop.

I think most people expect autotest to mean "upon saving a change" the tests are rerun, not when ever you to stop to scratch your nose. This actually seems like a hack to me. To have it run so often even when no changes have been saved by the user is an irritation not a useful feature. Especially as it is likely that the "autotest trigger" has occurred in the middle of a change and the tests therefore will fail.

1

Hi,

I think the run is triggered by auto-save.

Regards, Oleg.

0

Unfortunately it doesn't seem top be. I switched off autosave and it made no difference. In any case it was set to 15 seconds. I can barely count to three before it kicks in. Any other preferences that realte to file saving/timestamping that might trigger autotest? It is strange that I only need to hit the space bar and wait 3 seconds for the tests to rerun. No other interaction is needed.

REgards
Colin

0

I will investigate what we have here and what we can do to improve the situation.

Regards, Oleg.

0

Any update on this? An "on-save" value for AutoTest Delay would be better than testing unsaved changes and running tests too frequently.

0

Note for others stuck on this: A good alternative is to switch OFF autotest (it's really not that useful, running on period of inactivity rather than file save) and then use the Rerun command to run tests, which will first save any modified files. I have Rerun mapped to command-R, so hitting that saves all files and runs tests.

0

@Tim,

since you've also left a comment in the corresponding issue, please answer there: https://youtrack.jetbrains.com/issue/RUBY-7630#comment=27-2230802

0

Please sign in to leave a comment.