Cannot run Apex tests
When trying to run an Apex test, the following message appears: "Cannot start compilation: the output path is not specified for module "IDM4GS_Dev". Specify the output path in Configure Project." When clicking ok, the Module settings are opened, but where can I specifiy an output path?
This happens both when right-clicking a test method and choosing the "Run..." menu item, as well when right-clicking a test class in the project struture.
Comments (12)
-
reporter -
repo owner Hi, Uwe. That's definitely odd. I'll have to review my changes for the latest build to see what might have caused this behavior. In the interim, you can set an output path in Settings>Project Structure>Project under Product compiler output. Just take the root of your project directory plus a subdirectory such as
out
, e.g., on one of my projects, it's set toC:\dev\projects\myProjectName\out
. Let me know if that doesn't get you unstuck. -
reporter Thanks a lot. The recommended workaround works fine. The path was empty in both of my projects. I guess the original path pointed into the workspace, which is in a totally different location in my case.
-
repo owner Glad to hear. Did you happen to update IntelliJ IDEA to the latest at the same time? I'm not sure what would have changed between 1.7.6.0 and 1.7.6.1 that would have caused this behavioral change. The validation of that directory is something that's pretty much internalized to the core IDE. Could very well be something I did, but I'm having a hard time finding it if it is...
-
Account Deactivated I had this same issue starting this morning. Path is in my project, that's how I've always had it. I can move it out also.
I upgraded IDEA about a week ago, yesterday I pulled in the Illuminated Cloud update
-
repo owner That's very interesting. I'll take a close look this evening and see if I can figure out what might be causing it. Sounds like it must be something I did...
-
repo owner Okay, I don't see anything that would have explicitly caused this, but as part of the fix for
#489I did slightly change something in unit test execution to ensure that there's a module-aware filter in place for console hyperlink creation. It's a one-line change, but it's very possible it changed something in the way IntelliJ's unit test SDK is engaged so that it now cares (more?) about the output directory. I'll see if I can reproduce the behavior in one of my own projects to get a better idea of whether it's something I can handle seamlessly. -
repo owner It appears that it may be happening because the unit test run configs are created with with a Before launch step of Build which basically copies the contents of the
src
directory into the designated output Product compiler output directory. This is obviously unnecessary and just ends up cluttering the file system. I'll use this filed bug to make a change to ensure that Before launch step isn't present. -
repo owner Yep, I can see the change that caused this now. I changed my run configurations (both unit test and offline debugger) to implement an interface called
ModuleRunProfile
in order to become module-aware. Evidently that drags in something calledRunProfileWithCompileBeforeLaunchOption
which, unless explicitly disabled, automatically adds the Before launch>Build step. I have a change staged now that pulls in what I want to fix the original issue without dragging in what I don't want. I'll see if I can get it tested and ready for release tomorrow, but worst-case scenario I'll post it Monday morning if more testing is required. -
repo owner - changed version to 1.7.6.2
-
assigned issue to
-
repo owner - changed status to resolved
Delivered in 1.7.6.2.
-
repo owner - changed component to Apex Unit Testing
- Log in to comment
This is since the latest plugin version which I installed today in the morning.