Recommended Free Tools
To configure Cucumber in Eclipse or IntelliJ IDEA, add the matching Cucumber-JVM dependencies and test runner to your Java project, then use the IDE’s Cucumber integration to run a feature file. The plugin helps the IDE understand Gherkin and launch tests; it does not replace the project dependencies. Keep all Cucumber modules on the same version, and choose the JUnit 4 integration or JUnit 5 platform engine to match your project.
Set up Cucumber in the Java project first
Use an existing Maven or Gradle Java project, or create one before configuring the IDE. Add io.cucumber:cucumber-java in test scope and one runner integration appropriate for the project’s test platform. Cucumber’s installation guide documents Maven and Gradle setup and advises using the same version for Cucumber dependencies. Its reference describes execution through JUnit 4, JUnit 5, build tools, IDEs, and the CLI.
As an Amazon Associate I earn from qualifying purchases.
Maven dependencies
For JUnit 4, add the Java module and Cucumber’s JUnit 4 integration. Set cucumber.version to one Cucumber version used by both dependencies. The property below is a value you must supply, not a literal version:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
<properties>
<cucumber.version>YOUR_CUCUMBER_VERSION</cucumber.version>
</properties>
<dependencies>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
For a JUnit 5 project, use cucumber-junit-platform-engine rather than copying the JUnit 4 integration as though it were interchangeable. Follow the project’s existing JUnit Platform setup and Cucumber’s installation guide for its matching dependencies and build-tool configuration. A JUnit 5 project that needs to run JUnit 4 tests may use a Vintage engine, but that is a separate compatibility choice; cucumber-junit itself is based on JUnit 4.
Gradle dependency pattern
The equivalent test-scoped setup uses the same Cucumber version for each Cucumber artifact. Choose one integration that matches the test platform:
def cucumberVersion = 'YOUR_CUCUMBER_VERSION'
dependencies {
testImplementation "io.cucumber:cucumber-java:$cucumberVersion"
// Choose this for a JUnit 4 project:
testImplementation "io.cucumber:cucumber-junit:$cucumberVersion"
// For a JUnit 5 project, use cucumber-junit-platform-engine
// instead of cucumber-junit, with the project's JUnit Platform setup.
}
Do not leave both runner choices in the build by default. Cucumber does not bundle an assertion library; use the assertions provided by your chosen testing library.
JUnit 4 runner example
With cucumber-junit, create a test runner class such as:
Free tools Windows power users keep installed
One-click scans. No signup required.
import org.junit.runner.RunWith;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/test/resources",
glue = "com.example.steps"
)
public class RunCucumberTest {
}
Change features to the location of your feature files and glue to the Java package containing your step definitions. This runner is for the JUnit 4 integration; do not use it as the JUnit 5 runner configuration.
Configure Cucumber in Eclipse
- Install Cucumber-Eclipse from Eclipse Marketplace, or use the project’s documented update site: https://cucumber.github.io/cucumber-eclipse/update-site.
- Ensure the Java project has the Cucumber-JVM dependencies and runner integration described above. Let the build tool resolve them before diagnosing an IDE-only failure.
- Create a
.featurefile in the project and add a Gherkin scenario. - Select the feature file and use Run > Run to invoke Cucumber-JVM. The plugin creates a run configuration for that invocation.
- To adjust or rename it, open Run > Run Configurations and inspect its Feature Path and other settings.
Run a subset of features in Eclipse
The Cucumber-Eclipse project README says its plugin does not provide tag filtering. To run a subset, organize features in directories and set the desired file or directory as the Feature Path in the run configuration. Alternatively, keep the plugin for feature editing and generated step-definition stubs, then run a JUnit runner class such as the one above.
Configure Cucumber in IntelliJ IDEA
- Install or enable the Cucumber for Java plugin. The official Cucumber Java tutorial identifies it for its IntelliJ getting-started path. Plugin availability and IDE compatibility can change, so check the live JetBrains Marketplace listing for the installed IntelliJ IDEA release.
- Confirm the project itself has
cucumber-javaand the runner integration matching its JUnit setup. Installing the IDE plugin alone does not add those dependencies. - Open Run > Edit Configurations, add a Cucumber Java configuration, and set the feature file or directory to run.
- If IntelliJ cannot find step definitions, enter the package containing those Java classes in the configuration’s Glue field. Use a package name such as
com.example.steps, not a filesystem path. - Run the configuration and check that its feature selection and Glue value match the project’s actual source and resource locations.
JetBrains may change menu labels or configuration fields between IDE releases. If the installed version’s screen differs, consult the current Cucumber Java run configuration documentation linked from Cucumber’s FAQ.
Rank #4
Choose the correct runner and verify discovery
| Project test platform | Cucumber integration | Important distinction |
|---|---|---|
| JUnit 4 | cucumber-junit |
Uses a runner class annotated with @RunWith(Cucumber.class). |
| JUnit 5 | cucumber-junit-platform-engine |
Uses the JUnit Platform; do not assume the JUnit 4 runner applies. |
| JUnit 5 project that also runs JUnit 4 tests | JUnit Platform engine plus an appropriate Vintage setup if needed | The Cucumber JUnit 4 integration remains based on JUnit 4. |
Run the same tests through Maven or Gradle as well as through the IDE. If the build-tool run fails too, fix the project configuration before treating it as an IDE discovery problem. For Maven, inspect resolved dependencies with:
mvn dependency:tree
Troubleshoot common configuration failures
- IDE says Cucumber classes or annotations cannot be resolved: confirm the build tool has imported the test dependencies and that
cucumber-javais present in test scope. NoSuchMethodExceptionor an old runtime class appears: inspectmvn dependency:treefor conflicting transitive Cucumber versions, then align all Cucumber modules.- A JUnit runner does not launch: check whether the project uses JUnit 4 or JUnit 5. Use
cucumber-junitand@RunWithfor the JUnit 4 path; use the JUnit Platform engine for JUnit 5. - IntelliJ reports undefined steps: set the correct Java package in the Cucumber Java configuration’s Glue field and ensure the step classes are in the test sources.
- Eclipse runs the wrong scenarios or none: inspect the generated run configuration’s Feature Path and point it at the intended feature file or directory.
- Build-tool run works but IDE run fails: check the IDE’s configuration fields and whether its project model has reloaded the latest dependencies.
- Environment variables are missing only in IDE runs: set them in the IDE run configuration; variables set in a separate shell are not automatically the IDE-launched process environment.
- A Ruby Cucumber instruction does not work for Cucumber-JVM: do not assume Ruby profiles or
.envfiles configure the JVM implementation. Cucumber documents that JVM profiles are unavailable and that JVM configuration does not use an env file; use the JVM-supported configuration mechanisms instead.
Or skip the browser setup
This Cucumber setup does not require a screenshot service. If a separate development task needs a website screenshot, ScreenshotNeo is a website screenshot API with an MCP server. Its request can return a PNG, JPEG, WebP, or PDF; the example below saves a WebP response for a target URL.
Quick Recap
Best Value
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. It removes cookie and consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server provides screenshot tools for AI agents. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




