Rebuild more frequently for continuous testing

Answered

I'm using TDD and I can't find a way to get fast test feedback even on tiny projects.

There's a ~4-second delay between a save of a file and when a rebuild is launched, so I get the test run 5-7 seconds after a save. The delay is the same whether ì use the autotest of intellij or the plugin infinitest. I find that unnecessarily slow but I can't find a way to reduce this wait-time. 

My settings : Build, Execution and deployment | compiler 

  • clear output directory on rebuild is OFF
  • build project automatically is ON

 

If I force a build the test result comes immediately after build. I do find that a bit annoying though.

A while ago we could customize the autotest delay but that feature seems to have gone away.

What can I do to get much faster feedback cycles at least on toy projects?

0
5 comments

Hi. Could you please provide idea.log and build.log after reproducing the problem?

0
Avatar
Permanently deleted user

Sure, Here are the logs for one change and the following build


build.log

2018-12-15 15:55:05,442 [ 100893] INFO - .incremental.IncProjectBuilder - Building project; isRebuild:false; isMake:true parallel compilation:true
2018-12-15 15:55:05,447 [ 100898] INFO - kotlin.jps.build.KotlinBuilder - is Kotlin incremental compilation enabled for JVM: true
2018-12-15 15:55:05,447 [ 100898] INFO - kotlin.jps.build.KotlinBuilder - is Kotlin incremental compilation enabled for JS: false
2018-12-15 15:55:05,453 [ 100904] INFO - kotlin.jps.build.KotlinBuilder - is Kotlin compiler daemon enabled: true
2018-12-15 15:55:06,017 [ 101468] INFO - kotlin.jps.build.KotlinBuilder - KotlinTargetsIndex created in 443 ms
2018-12-15 15:55:06,028 [ 101479] INFO - kotlin.jps.build.KotlinBuilder - Total Kotlin global compile context initialization time: 456 ms
2018-12-15 15:55:06,170 [ 101621] INFO - s.incremental.java.JavaBuilder - Compiling 1 java files; module: java (tests)
2018-12-15 15:55:06,606 [ 102057] INFO - brains.jps.incremental.Builder - Dependency analysis found 0 affected files
2018-12-15 15:55:06,654 [ 102105] INFO - rains.jps.cmdline.BuildSession - Build duration: Builder 'Java' took 342 ms; 1 sources processed (342 ms per file)
2018-12-15 15:55:06,662 [ 102113] INFO - s.incremental.java.JavaBuilder - javac 1.8.0_152 was used to compile [java]
2018-12-15 15:55:07,104 [ 0] INFO - etbrains.jps.cmdline.BuildMain - ==================================================
2018-12-15 15:55:07,105 [ 1] INFO - etbrains.jps.cmdline.BuildMain - Build process started. Classpath: /Users/johan/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.4588.61/IntelliJ IDEA.app/Contents/lib/jps-launcher.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/tools.jar:/Users/johan/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.4588.61/IntelliJ IDEA.app/Contents/lib/optimizedFileManager.jar
2018-12-15 15:55:07,430 [ 326] INFO - etbrains.jps.cmdline.BuildMain - Connection to IDE established in 295 ms
2018-12-15 15:55:07,495 [ 391] INFO - jps.cmdline.JpsModelLoaderImpl - Loading model: project path = /Users/johan/workspace/kata-setup/java, global options path = /Users/johan/Library/Preferences/IntelliJIdea2018.3/options
2018-12-15 15:55:07,752 [ 648] INFO - serialization.JpsProjectLoader - External project config dir is used: /Users/johan/Library/Caches/IntelliJIdea2018.3/external_build_system/java.988a5daf/project
2018-12-15 15:55:07,756 [ 652] INFO - serialization.JpsProjectLoader - External project config dir is used for modules: /Users/johan/Library/Caches/IntelliJIdea2018.3/external_build_system/java.988a5daf/modules
2018-12-15 15:55:07,835 [ 731] INFO - jps.cmdline.JpsModelLoaderImpl - Model loaded in 340 ms
2018-12-15 15:55:07,835 [ 731] INFO - jps.cmdline.JpsModelLoaderImpl - Project has 1 modules, 12 libraries
2018-12-15 15:55:07,908 [ 804] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=602
2018-12-15 15:55:07,988 [ 884] INFO - etbrains.jps.cmdline.BuildMain - Pre-loaded process ready in 885 ms

idea.log

2018-12-15 15:55:05,372 [ 433176] INFO - j.compiler.server.BuildManager - Using preloaded build process to compile /Users/johan/workspace/kata-setup/java 
2018-12-15 15:55:06,840 [ 434644] INFO - s.CompilerReferenceServiceBase - backward reference index reader is opened
2018-12-15 15:55:07,104 [ 434908] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Users/johan/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.4588.61/IntelliJ IDEA.app/Contents/lib/jps-launcher.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/tools.jar:/Users/johan/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.4588.61/IntelliJ IDEA.app/Contents/lib/optimizedFileManager.jar
2018-12-15 15:55:07,159 [ 434963] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2018-12-15 15:55:07,160 [ 434964] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Defaulting to no-operation (NOP) logger implementation
2018-12-15 15:55:07,161 [ 434965] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

 

0

Does it work after if you invoke File | Save All? 

0
Avatar
Permanently deleted user

I am experiencing the same 4 second delay before the build starts when I tried with the IntelliJ IDEA 2019.2. This makes it really difficult to fast TDD. Any progress on fixing this issue?

0

Please sign in to leave a comment.