Having trouble debugging JUnit tests in a TeamCity Remote Agent
I am trying to run a unit test remotely in TeamCity because it consistently passes on my PC while consistently fails on the TeamCity Server.
I have set up a build configuration in TeamCity for my project consisting of an IntelliJ Idea Project build step.
I use Maven in my project.
When I trigger the remote debug, it fails within the message:
"Maven project configuration required for module '<module name>' isn't available. Compilation of Maven projects is supported only if external build is started from an IDE."
I can run the same JUnit configuration locally just fine - so I don't think I have a general problem with my project configuration.
Is there any way I can get this to work? Or is remote debugging JUnit tests in Maven modules totally not supported?
Here is some important information about my environment:
- On my PC, I'm using IDEA 2018.1.4 (Ultimate Edition) Build #IU-181.5087.20, built on May 16, 2018
- In my local IntelliJ, I'm using build #2018.1.58262 of the TeamCity integration plugin
- On my server, I'm using TeamCity Professional 9.1.6 (build 37459)
- The IntelliJ Idea Project build step has the following configuration:
Unresolved Project Modules and Path Variables - only has MAVEN_REPOSITORY, set to %system.path.macro.MAVEN.REPOSITORY% - I've defined that variable, it's a user-defined one
Detect global libraries and module-based JDK in the *.iml files: not selected
Project SDK: %env.JAVA_HOME%
Classes to compile: unchecked
Incremental Make: unchecked
Artifacts to build: none selected
Run configurations to execute: none selected - I have the following IDEA meta-data files checked in and have verified that they appear within the environment TeamCity checked out:
all *.iml files for all modules
.idea directory - artifacts directory,compiler.xml,<root module>.iml,encodings.xml,modules.xml,code-comments-settings.xml,inspectionProfiles directory,runConfigurations directory,libraries,uiDesigner.xml,codeStyles,misc.xml,vcs.xml
Thanks,
-Ian Hamilton
Modelshop
Please sign in to leave a comment.
Hi Ian,
this error message, particularly in 9.1 was known: https://youtrack.jetbrains.com/issue/TW-38747
Could you check whether the fix mentioned there would work in your situation?
Denis,
Thanks for the response.
We're actually planning an upgrade to the latest version of TeamCity - 2018.1. So I'll try again once we've done that. If it doesn't work straight-away in that version, I'll just apply the workaround from TW-38747.
-Ian