Skip to main content

Auto-recompile on save

SpecBinder generates test classes during the build. Thus a change to a Gherkin spec reaches the test only after the next build. The plugin can automatically regenerate the test class when you save the spec file.

Select what occurs each time that you save a spec file. The setting is Settings → Tools → SpecBinder → File handling → When a spec file is saved. The settings use the name marker class for the class with the @Gherkin2JUnit annotation, because that class marks which spec files to read.

  • Recompile marker class (default) — build that class immediately. Thus you can edit a step, save, and run the test. The generated code is already current.
  • Touch marker class — mark the class for a rebuild, but do not build it now. The next build that you start regenerates the test class.
  • Off — do nothing when you save.

<The File handling page under Settings → Tools → SpecBinder, with the "When a spec file is saved" dropdown open and its three options visible.>