9 Replies Last post: Apr 23, 2013 2:28 PM by Denis Zhdanov  
Shai Yallin Newbie 7 posts since
Nov 7, 2012
Currently Being Moderated

Apr 22, 2013 12:47 PM

Right-click on a test class does not show the "run" options

Running IDEA 12.1.1 on a new MacBook Pro to which I migrated using my Time Machine backup.

Everything works properly, except that right-clicking a test class does not display the Run options (Run as JUnit / Specs2 / ScataTest etc).

I tried invalidating caches and re-importing the project from the POM files, to no avail. I am able to run the tests by manually creating a run configuration.

 

I saw this SO thread but I'm reluctant to completely obliterate my IDEA installation unless no other options is available.

 

Has anyone experienced this or has an idea what I can do to resolve the issue?

 

Thanks

Matt Shulman Newbie 3 posts since
Apr 7, 2013
Currently Being Moderated
Apr 22, 2013 10:48 PM in response to: Shai Yallin
Re: Right-click on a test class does not show the "run" options

Hi, just a guess, but could you make sure the source root is mark as a test source root?   (Go to the project window, find this class, then find the source root directory.  Then right click, choose "Mark Directory As" menu item, and then click "Test Source Root".)

 

(With my settings, the test classes now have a pale light green background and I can right-click on a test class and see the Run/Debug menu items for it.)

 

Matt

Denis Zhdanov Expert 1,620 posts since
Oct 20, 2007
Currently Being Moderated
Apr 23, 2013 11:15 AM in response to: Shai Yallin
Re: Right-click on a test class does not show the "run" options

Hi Shai,

 

Could you provide a sample project which shows the problem at your environment?

 

Denis

Denis Zhdanov Expert 1,620 posts since
Oct 20, 2007
Currently Being Moderated
Apr 23, 2013 12:44 PM in response to: Shai Yallin
Re: Right-click on a test class does not show the "run" options

Your project works just fine at my environment - ContextMenuTest is successfully run via context menu action.

 

Please try to execute 'main menu | file | invalidate caches' and check if it helps.

 

Also provide your idea.log (main menu | help | show log), it might contain relevant error messages.

 

Denis

Denis Zhdanov Expert 1,620 posts since
Oct 20, 2007
Currently Being Moderated
Apr 23, 2013 2:12 PM in response to: Shai Yallin
Re: Right-click on a test class does not show the "run" options

The log shows the problem:

 

2013-04-23 11:37:33,108 [147451904]  ERROR - penapi.actionSystem.impl.Utils - update failed for AnAction with ID=RunClass

java.lang.NoSuchMethodError: com.intellij.ide.browsers.WebBrowserService.getUrlToOpen(Lcom/intellij/psi/PsiElement;)Ljava/lang/String;

    at com.intellij.javascript.debugger.execution.JavaScriptDebugConfigurationProducer.createConfigurationByLocation(JavaScriptDebugConfigurationProducer.java:85)

 

I.e. there was an error during preparing 'run' action for the context menu. Checking further

 

Denis

Denis Zhdanov Expert 1,620 posts since
Oct 20, 2007
Currently Being Moderated
Apr 23, 2013 2:28 PM in response to: Shai Yallin
Re: Right-click on a test class does not show the "run" options

It looks like your IJ binaries were somehow broken because I've just checked that IU 12.1.1 has that method at the binary distribution (namely, $IJ_HOME/lib/openapi.jar).

 

Denis

More Like This

  • Retrieving data ...