How to default test coverage to "tracing" when running tests with coverage ?
Answered
How to default test coverage to "tracing" when running tests with coverage ?
Please sign in to leave a comment.
Modify the configuration you are using under Templates so that all the new configurations inherit this setting:
Hi,
It works only per project. Globally, the options are not available:
And I do not have any JDK/JRE lower than 1.8 on my computer'
File | Other Settings | Run Configuration Templates for new projects?
If you look at the screenshot carefully, this is where I am ;-)
What IntelliJ IDEA version do you use? The options are not disabled for me:
Wow! I would like to have the same options ;-)
IntelliJ IDEA 2019.2.4 (Ultimate Edition)
Build #IU-192.7142.36, built on October 29, 2019
Runtime version: 11.0.4+10-b304.77 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.1
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Registry: debugger.watches.in.variables=false
Non-Bundled Plugins: CMD Support, TunnelliJ, Lua, com.intellij.ideolog, com.kondratevpavel.plugins.goland.gomethodgenerator, net.seesharpsoft.intellij.plugins.csv, org.asciidoctor.intellij.asciidoc, org.exbin.deltahex.intellij, org.intellij.RegexpTester, com.mycila.intellij.plugin.gmavenplus, org.jetbrains.plugins.go-template, org.jetbrains.plugins.go, org.sylfra.idea.plugins.linessorter
(update)
I have just updated to the new version:
IntelliJ IDEA 2019.3 (Ultimate Edition)
Build #IU-193.5233.102, built on November 27, 2019
Runtime version: 11.0.4+10-b520.11 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.1
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Registry: debugger.watches.in.variables=false
Non-Bundled Plugins: CMD Support, TunnelliJ, com.intellij.ideolog, com.kondratevpavel.plugins.goland.gomethodgenerator, com.mycila.intellij.plugin.gmavenplus, net.seesharpsoft.intellij.plugins.csv, org.asciidoctor.intellij.asciidoc, org.exbin.deltahex.intellij, org.intellij.RegexpTester, org.jetbrains.plugins.go-template, org.jetbrains.plugins.go, org.sylfra.idea.plugins.linessorter
Now, this is worse. When I click on the Junit menu item, nothing is shown on the right and I have a "blue" highlight that appears:
(update)
Here is the stack trace that appears in idea.log when I click on Junit menu item:
2019-12-06 14:56:33,166 [ 396540] ERROR - llij.ide.plugins.PluginManager - project.getComponent(Kot…tionListener::class.java) must not be null
java.lang.IllegalStateException: project.getComponent(Kot…tionListener::class.java) must not be null
at org.jetbrains.kotlin.idea.caches.trackers.KotlinCodeBlockModificationListener$Companion.getInstance(KotlinCodeBlockModificationListener.kt:223)
at org.jetbrains.kotlin.idea.stubindex.SubpackagesIndexService$SubpackagesIndex.<init>(SubpackagesIndexService.kt:45)
at org.jetbrains.kotlin.idea.stubindex.SubpackagesIndexService$cachedValue$1.compute(SubpackagesIndexService.kt:35)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
at com.intellij.util.CachedValueBase.lambda$getValueWithLock$1(CachedValueBase.java:240)
at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:113)
at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:71)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:241)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
at org.jetbrains.kotlin.idea.stubindex.SubpackagesIndexService$Companion.getInstance(SubpackagesIndexService.kt:90)
at org.jetbrains.kotlin.idea.stubindex.PackageIndexUtil.packageExists(PackageIndexUtil.kt:53)
at org.jetbrains.kotlin.idea.caches.resolve.IDEKotlinAsJavaSupport.packageExists(IDEKotlinAsJavaSupport.kt:99)
at org.jetbrains.kotlin.asJava.finder.JavaElementFinder.findPackage(JavaElementFinder.kt:121)
at com.intellij.psi.impl.JavaPsiFacadeImpl.findPackage(JavaPsiFacadeImpl.java:225)
at com.intellij.execution.junit2.configuration.JUnitConfigurable.reloadTestKindModel(JUnitConfigurable.java:280)
at com.intellij.execution.junit2.configuration.JUnitConfigurable.<init>(JUnitConfigurable.java:159)
at com.intellij.execution.junit.JUnitConfiguration.getConfigurationEditor(JUnitConfiguration.java:162)
at com.intellij.execution.impl.ConfigurationSettingsEditor.<init>(ConfigurationSettingsEditor.java:197)
at com.intellij.execution.impl.ConfigurationSettingsEditorWrapper.<init>(ConfigurationSettingsEditorWrapper.java:49)
at com.intellij.execution.impl.TemplateConfigurable.<init>(TemplateConfigurable.java:14)
at com.intellij.execution.impl.RunConfigurable.showTemplateConfigurable(RunConfigurable.kt:303)
at com.intellij.execution.impl.RunConfigurable.access$showTemplateConfigurable(RunConfigurable.kt:83)
at com.intellij.execution.impl.RunConfigurable$initTree$4.valueChanged(RunConfigurable.kt:238)
at java.desktop/javax.swing.JTree.fireValueChanged(JTree.java:2967)
at java.desktop/javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3456)
at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:641)
at com.intellij.ui.treeStructure.Tree$MySelectionModel.fireValueChanged(Tree.java:621)
at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1111)
at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:297)
at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:191)
at java.desktop/javax.swing.JTree.setSelectionPath(JTree.java:1656)
at java.desktop/javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2736)
at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeUI.java:4016)
at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.java:3955)
at com.intellij.util.ui.MouseEventAdapter.mousePressed(MouseEventAdapter.java:33)
at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6648)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:391)
at java.desktop/java.awt.Component.processEvent(Component.java:6416)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4544)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:906)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:844)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:776)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:422)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:687)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:421)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.desktop/java.awt.Dialog.show(Dialog.java:1063)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:708)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:433)
at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1698)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1657)
at com.intellij.execution.actions.EditRunConfigurationTemplatesForNewProjectsAction.actionPerformed(EditRunConfigurationTemplatesForNewProjectsAction.kt:13)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:266)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:283)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:294)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:263)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:77)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:284)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:112)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:83)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:107)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:116)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:112)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:401)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369)
at java.desktop/com.apple.laf.ScreenMenuItemCheckbox.itemStateChanged(ScreenMenuItemCheckbox.java:198)
at java.desktop/java.awt.CheckboxMenuItem.processItemEvent(CheckboxMenuItem.java:396)
at java.desktop/java.awt.CheckboxMenuItem.processEvent(CheckboxMenuItem.java:364)
at java.desktop/java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:375)
at java.desktop/java.awt.MenuComponent.dispatchEvent(MenuComponent.java:363)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:906)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:779)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:422)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:421)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
2019-12-06 14:56:33,166 [ 396540] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2019.3 Build #IU-193.5233.102
2019-12-06 14:56:33,167 [ 396541] ERROR - llij.ide.plugins.PluginManager - JDK: 11.0.4; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2019-12-06 14:56:33,167 [ 396541] ERROR - llij.ide.plugins.PluginManager - OS: Mac OS X
2019-12-06 14:56:33,167 [ 396541] ERROR - llij.ide.plugins.PluginManager - Plugin to blame: Kotlin version: 1.3.60-release-IJ2019.3-1
2019-12-06 14:56:33,167 [ 396541] ERROR - llij.ide.plugins.PluginManager - Last Action: RunConfigurationTemplatesForNewProjects
So I have disabled a bunch of plugins, including Kotlin. Now I am abkle to see the Junit content, but, still the same error:
It's a known bug, should be fixed in one of the next updates: https://youtrack.jetbrains.com/issue/IDEA-226058 .
For my issue: I see there is a workaround there:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206322309-default-code-coverage-settings
But this is not normal that I have to fix the JDK version to access this option... This will impact a lot of projects. I would prefer having this option automatically disabled if I am working in the project with JDK < 1.5