skillfed

lettuce-skill

lettuce-skill enables you to create and execute Behavior-Driven Development tests using Lettuce, a Python-based BDD framework. Write feature files in Gherkin syntax and define step implementations to automate test scenarios. Integrate seamlessly with your Python testing workflows.

lettuce-skill enables you to create and execute Behavior-Driven Development tests using Lettuce, a Python-based BDD framework. With lettuce-skill, you write feature files in Gherkin syntax and define step implementations to automate test scenarios, integrating seamlessly with your Python testing workflows. The skill supports the full lifecycle of BDD test development, from scenario design through execution and reporting.

AI-generated summary based on this skill's SKILL.md

339 68 MIT updated by LambdaTest

Install

LambdaTest/agent-skills/lettuce-skill · repository language: Python

CLI (skillfed)coming soon
git clone https://github.com/LambdaTest/agent-skills
cp -r agent-skills/lettuce-skill ~/.claude/skills/lettuce-skill

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What is lettuce-skill and how does it help with BDD testing in Python?

lettuce-skill enables you to create and execute Behavior-Driven Development tests using Lettuce, a Python-based BDD framework. With lettuce-skill, you write feature files in Gherkin syntax and define step implementations to automate test scenarios, integrating seamlessly with your Python testing workflows. The skill supports the full lifecycle of BDD test development, from scenario design through execution and reporting.

How do I write lettuce tests with feature files and step definitions?

lettuce-skill guides you through writing feature files in Gherkin syntax and creating corresponding step definitions in Python. Feature files describe your test scenarios in plain language using Given, When, and Then statements. Step definitions map these Gherkin phrases to Python code that performs the actual test logic. lettuce-skill provides templates and examples to help you structure both files correctly and link them together for automated test execution.

What is the gherkin syntax lettuce python framework and how does lettuce-skill support it?

Gherkin is the plain-language syntax used in Lettuce feature files to describe test scenarios. lettuce-skill helps you master Gherkin syntax by explaining keywords like Feature, Scenario, Given, When, Then, and And, which form the foundation of readable BDD tests. lettuce-skill also covers Lettuce-specific patterns for organizing these scenarios and linking them to Python step definitions, ensuring your tests are both human-readable and machine-executable.

How can lettuce-skill help me set up Lettuce with Selenium for browser automation?

lettuce-skill provides guidance on integrating Lettuce with Selenium for browser automation testing. You can define step definitions that control web browsers, interact with page elements, and verify application behavior. lettuce-skill covers terrain setup and teardown patterns to initialize WebDriver instances before tests and clean up resources afterward, enabling reliable end-to-end testing workflows with Lettuce and Selenium.

What does lettuce-skill teach about terrain setup and teardown in Lettuce?

lettuce-skill explains Lettuce's terrain module, which handles setup and teardown operations for your test suite. The terrain file allows you to initialize shared resources (like database connections or WebDriver instances) before tests run and clean them up afterward. lettuce-skill demonstrates how to structure terrain.py files, define before_all and after_all hooks, and manage test fixtures efficiently to ensure consistent test execution and resource management.

Should I migrate from lettuce to behave, and how does lettuce-skill address this?

lettuce-skill acknowledges that Behave is a more actively maintained Python BDD framework and provides guidance on evaluating Lettuce versus other Python BDD tools for your test automation needs. If you decide to migrate from legacy Lettuce to modern Behave, lettuce-skill offers insights into the differences between the frameworks, common migration patterns, and strategies for transitioning your existing feature files and step definitions to Behave while minimizing disruption to your test suite.

SKILL.md

rendered from the published skill — quoted content, verbatim

Lettuce BDD Skill (Legacy)

> Note: Lettuce is largely unmaintained. For new Python BDD projects, use Behave instead.

Core Patterns

Feature File (features/login.feature)
Feature: User Login
  Scenario: Successful login
    Given I navigate to the login page
    When I enter "user@test.com" as email
    And I enter "password123" as password
    And I click login
    Then I should see the dashboard

  Scenario: Invalid login
    Given I navigate to the login page
    When I enter "bad@test.com" as email
    And I enter "wrong" as password
    And I click login
    Then I should see "Invalid credentials"
Step Definitions (features/steps.py)

```python from lettuce import step, world from selenium import webdriver from

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 3 files
lettuce-skill/SKILL.md
lettuce-skill/reference/advanced-patterns.md
lettuce-skill/reference/playbook.md

Related skills

Tags

legacy-framework gherkin-syntax browser-automation scenario-testing test-setup-teardown cloud-execution bdd-migration selenium-integration