Open full view…

IDEA 2019.3.3: IDEA just stops responding after running TestMe

Mon, 02 Mar 2020 07:35:58 GMT

The tested Class is a huge class with codes of 2.5K line. Run TestMe, then IDEA just stop responding to my operation.

Mon, 02 Mar 2020 07:41:45 GMT

It seems to be a common problem of unit test generator, because this happeneed when I generated unit test by another unit test generater.

Wed, 04 Mar 2020 10:29:38 GMT

Hi ben2020 - thanks for reporting some tips that might help here: 1. Is it freezing or just very busy? if it takes a long time to generate code for a very big target class, it might be worth while waiting. check IDEA logs to see if theres any action going on, or if there are errors. `Help -> Show log` `Help -> Debug log settings` 2. Do you sometimes get freezed on other actions? you might want to consider extending memory args for IDEA VM `Help -> Edit custom VM options` 3. Theres an internal property for controlling TestMe max recursion depth, when inspecting target test class dependencies - `maxRecursionDepth` - it is set to 9 by default. You can try to lower this threshold. Follow these instructions - If that helped and you think it might be useful - I can add this configuration property to IDEA configuration UI ( _Preferences -> Other Settings -> TestMe_)

Fri, 27 Mar 2020 07:14:19 GMT

Thanks for your reply. It is freezing. Looks like it blocked other threads of IDEA. Lowering the maxRecursionDepth did not help. Does TestMe really block other threads?

Fri, 27 Mar 2020 21:23:33 GMT

The plugin doesn't block other threads explicitly, but I guess when the physical resources are at high consumption rate, other threads are effected. Try to extend -Xmx on IDEA vm options, if you can. Otherwise, as a workaround, you can try to temporarily reduce code on the tested class. just temporarily comment out big code sections and see if you can still generate test code that has some value. BTW, as a best practice, smaller code units improve modularity and testability, so you might want to refactor anyway.

Sat, 28 Mar 2020 02:26:20 GMT

Thanks for your good advices!