Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Import Groovy Maven Project in IDE

Groovy Maven Project is structured for users to easily import the project into IDE. If you already have an IDE which supports Groovy and Maven, you can easily import it. However if you don’t have it yet, please follow the instruction in Install Groovy IDE first. If you prefer to use IntellJ instead of Eclipse, go Import Groovy Maven Project in IntelliJ.

If you have installed the Eclipse based Groovy IDE and created Groovy Maven Project in nGrinder subversion, you can import the Groovy Maven Project using the subversion client in Eclipse.


Notice that there is the subversion URL field in the script management page in nGrinder. The above screenshot shows the our test instance. In this instance, the created Groovy Maven project can be accessed through http://localhost:8080/svn/admin/project URL according to the above page .
OK. Let’s import the project.

  1. Open your Eclipse and Choose File ==> Others ==> Maven ==> Check out Maven Projects from SCM
  2. Select svn in the SVN URL and type the SVN URL provided in nGrinder. Then click Finish.
  3. Then the project will be imported.
  4. Enable Groovy on this project.
  5. Remove groovy libraries from classpath by selecting "Groovy ==> Remove Groovy libraries from classpath".
    It's because there is a conflict between groovy libraries provided by Maven and Eclipse.
  6. Select the Groovy test case and Select Run As ==> JUnit Test.
  7. Then you might see the following error. It’s because the specialized nGrinder JUnit Runner(named GrinderRunner) needs a special JVM argument for instrumentation
  8. Check the error message and add the JVM argument following the instruction. Select Run As ==> Run Configurations ==> Select Test1 ==> Select Arguments panel.
    Please be aware that the argument varies depending on the user account. So provide the exact argument which is shown in the JUnit error message. This setting should be provided for every JUnit test running set. If you like to make it as a default vm option for every test run. You can set it up in the global configuration. Please check Install Groovy IDE for details.
  9. Then run as JUnit test again.
  10. In my case, the access to causes the error. Ater changing this to . It shows the green bar now.
  11. You can add the break point in the test case. Then select Debug As ==> JUnit Test.
  12. Then you can debug the test case using the generic Eclipse debugging feature.
  13. When you think the test case writing is almost completed, you may want to see the result in the repeated run situation. You can provide the @Repeat annotation on the test case class for this need. Then run as JUnit test again.
  14. Then you can see that test case is executed multiple times you specified. Please note that it’s 100 repetition by single thread. (not multi thread or multi process)
  15. If you think the test case is ready, commit it into subversion selecting Team ==> Commit. Finally run this test in nGrinder.
comments powered by Disqus
Page info
viewed 12131 times
translations en
posted 4 years ago by
updated 2 years ago by
View revisions
Share this article