-
Notifications
You must be signed in to change notification settings - Fork 145
Debuging, Launching UTs
-
Pleasr be sure that you did a fork from us. Clone your foked repo to your PC.
-
Make sure that code is compilable from terminal, to do so please go to "sevntu-checks" folder and perform commmand "mvn install". Continue only if this passed without errors.
-
Launch Eclipse, make sure that you have "m2e" installed. If not - please use install by update site from here.
-
Import project "sevntu-checks" to workspace. Right click on empty space of Project Explorer view, select menu Import, General / Existing Project into Workspace.
-
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=${project_loc}/sevntu-checks/src/test/resources/com/github/sevntu/checkstyle
-Dtestsrcs.dir=${project_loc}/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.
-
Next launches of UTs could be done from toolbar sub-button.
-
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 :).
-
To investigate work of other checks please put break points in java code and debug it.