cucumber-fundamentals
Core Cucumber concepts, Gherkin syntax, and feature file structure
What this skill does
# Cucumber Fundamentals
Master the core concepts of Cucumber and Gherkin for behavior-driven development.
## Gherkin Syntax
Use the Given-When-Then structure for scenarios:
```gherkin
Feature: User Authentication
As a user
I want to log in to the application
So that I can access my account
Scenario: Successful login with valid credentials
Given I am on the login page
When I enter valid credentials
And I click the login button
Then I should be redirected to the dashboard
And I should see a welcome message
```
### Keywords
- **Feature**: High-level description of a software feature
- **Scenario**: Concrete example illustrating a business rule
- **Given**: Context or preconditions
- **When**: Action or event
- **Then**: Expected outcome
- **And/But**: Connect multiple steps
- **Background**: Common preconditions for all scenarios
- **Scenario Outline**: Template for multiple examples
- **Examples**: Data table for Scenario Outline
## Feature Files
Structure feature files logically:
```gherkin
Feature: Shopping Cart Management
In order to purchase products
As a customer
I want to manage items in my shopping cart
Background:
Given I am logged in as a customer
And my shopping cart is empty
Scenario: Add product to cart
When I add a "Laptop" to my cart
Then my cart should contain 1 item
And the cart total should be "$999.99"
Scenario: Remove product from cart
Given I have a "Laptop" in my cart
When I remove the "Laptop" from my cart
Then my cart should be empty
And the cart total should be "$0.00"
```
## Scenario Outlines
Use data tables for parameterized tests:
```gherkin
Scenario Outline: Login with different user types
Given I am on the login page
When I log in as "<user_type>"
Then I should see the "<dashboard>" dashboard
And I should have "<permissions>" permissions
Examples:
| user_type | dashboard | permissions |
| admin | Admin | full_access |
| user | User | limited_access |
| guest | Public | read_only |
```
## Tags
Organize and filter scenarios with tags:
```gherkin
@smoke @authentication
Scenario: User login
Given I am on the login page
When I enter valid credentials
Then I should be logged in
@wip
Scenario: Password reset
Given I am on the password reset page
# Work in progress
```
## Best Practices
1. **Write declarative scenarios** - Focus on *what*, not *how*
2. **Keep scenarios independent** - Each scenario should stand alone
3. **Use domain language** - Write in business terms, not technical implementation
4. **One scenario, one behavior** - Test one thing at a time
5. **Avoid UI details in Given/When/Then** - Stay at business logic level
## Example: Good vs Bad Scenarios
❌ **Bad** (imperative, implementation-focused):
```gherkin
Scenario: Update user profile
Given I navigate to "http://example.com/profile"
When I find the element with id "firstName"
And I clear the input field
And I type "John"
And I click the button with class "save-btn"
Then I should see the text "Profile updated"
```
✅ **Good** (declarative, business-focused):
```gherkin
Scenario: Update user profile
Given I am on my profile page
When I update my first name to "John"
Then my profile should be saved
And I should see a success message
```
## Data Tables
Pass structured data to steps:
```gherkin
Scenario: Register new user
Given I am on the registration page
When I fill in the registration form:
| Field | Value |
| First Name | John |
| Last Name | Doe |
| Email | [email protected] |
| Password | SecurePass123! |
Then I should be registered successfully
```
## Doc Strings
Pass multi-line text to steps:
```gherkin
Scenario: Submit contact form
Given I am on the contact page
When I submit a message:
"""
Hello support team,
I have a question about my recent order #12345.
Please contact me at your earliest convenience.
Best regards,
John Doe
"""
Then I should see a confirmation message
```
## Key Principles
- **Living Documentation**: Features serve as executable specifications
- **Collaboration**: Written by developers, testers, and business stakeholders
- **Ubiquitous Language**: Use domain terminology consistently
- **Examples over Rules**: Concrete examples clarify requirements
- **Automation**: Scenarios are automated tests
Remember: Cucumber scenarios are specifications first, tests second. They document expected behavior in a language everyone understands.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.