Overview

This section guides you through understanding what CukeTest's core document type—Feature File—is, and how to preview and edit them efficiently in CukeTest.

What is a Feature File?

Feature files (usually with the .feature extension) are the core assets in BDD (Behavior Driven Development). You can think of them as test cases written in plain English.

  • Why is it called "Feature"? Because like a movie script, it describes coherent stories of scenarios that occur when a user uses the software.
  • What is it for? Feature files can be understood not only by developers but also by business stakeholders and testers. It serves as both a requirement document and the basis for automated test scripts that can be executed automatically.

Editing Views

When you open a feature file in CukeTest, you can choose between two different editing views: Visual Mode and Text Mode.

The image below shows the interface for both views: Visual Mode on the left, and Text Mode on the right:

You can switch back and forth between these two views by clicking the toggle buttons (Visual Mode / Text Mode) in the top-right corner of the editor.

How to Choose a View?

View Type Who / When to Use Key Features
Visual Mode Beginners, non-technical personnel, or when building scenarios for the first time The interface is as intuitive as a table. Operations can be performed via double-clicking and right-clicking, making it less prone to formatting or syntax errors.
Text Mode Technical personnel proficient in syntax, or when copying and pasting large blocks of text Directly edit the underlying plain text. Supports shortcuts and code completion, making it suitable for efficient batch modifications.

Tip

Tip: Multiple feature documents can be opened at the same time, and each file can be edited in its own mode in a separate tab.

Document Editing vs. Project Editing

CukeTest supports working in two different ways:

  1. Document Mode: Open single or multiple isolated feature files directly for editing by double-clicking them.
  2. Project Mode: Open an entire project folder containing test code (e.g., associated Cucumber.js / pytest-bdd step definitions).
Feature Document Mode Project Mode
Run Test Scripts ❌ Cannot run (lacks associated code implementation) ✅ Can run the entire project or individual automated tests directly
Left Sidebar Navigation ❌ Not displayed ✅ Displays the full project directory structure
Code Generation & Advanced Features ❌ Unavailable ✅ Can automatically generate corresponding code snippets and templates from features

Note

Conclusion: If you just want to browse drafted requirement features, use Document Mode. But if you are doing full automated test development, be sure to enter in Project Mode (open the entire folder).

Project Validation

After you've written complex scenarios and code in Project Mode, how can you ensure there are no low-level errors?

Users can click Run -> Validate Project in the menu bar (or click the checkmark icon on the toolbar) to automatically check the health status of the current project.

What Can Validation Detect?

This is a mechanism to "clear the mines" in advance, allowing you to quickly identify errors or warnings that might cause subsequent execution failures. For example:

  • Scenario Outlines missing Example tables: You declared a scenario template that requires parameters but forgot to provide the table data.
  • Steps without matching code implementation: You wrote a step in the feature file but no corresponding automated action was found in the underlying JavaScript.
  • One step matches multiple script implementations: Conflicting regular expressions or duplicate definitions appeared in your code.
  • Unimplemented step definition code exists: The code exists, but its status is "Pending," and the actual logic hasn't been written yet.
  • JavaScript / Python syntax errors: Accompanied by basic syntax checks at the code level.

After execution, error results are displayed in the bottom panel. Double-clicking an error will take you directly to the cause:

results matching ""

    No results matching ""