Skip to content

Debuging, Launching UTs

romani edited this page Oct 1, 2012 · 11 revisions
  1. Clone code to your PC.

  2. Launch Eclipse

  3. Import project "sevntu-checks" to workspace. Right click on empty space of Project Explorer view, select menu Import, General / Existing Project into Workspace.

  4. After project successfully compiled - launch UTs. Right click on the checkstyle project, choose “Run as/Run configurations”. Double-click on the Junit to create new run configuration. In tab “test” choose Junit4 runner. In tab “Arguments” add to the VM arguments.

-Dtestinputs.dir=<PATH_TO_LOCAL_REPO>/sevntu-checks/src/test/resources/com/github/sevntu/checkstyle
-Dtestsrcs.dir=<PATH_TO_LOCAL_REPO>/sevntu-checks/src/test/java/com/github/sevntu/checkstyle/checks

Alternatively, you can open “Preferences/Java/Installed JREs”. Edit the used one and add to the default JVM arguments, that described above.

  1. Next launches of UTs could be done from toolbar sub-button.

  2. If UTs are passed without errors, so you are safe to edit code - all future failures of UTs after your changes will be caused by your changes, and need to be solved by you :).

  3. To investigate work of other checks please put break points in java code and debug it.

Clone this wiki locally