https://github.com/cabbage-ex/gherkin
A Gherkin file parser written in Elixir. Extracted from https://github.com/meadsteve/white-bread.
https://github.com/cabbage-ex/gherkin
cucumber elixir gherkin parse
Last synced: 8 months ago
JSON representation
A Gherkin file parser written in Elixir. Extracted from https://github.com/meadsteve/white-bread.
- Host: GitHub
- URL: https://github.com/cabbage-ex/gherkin
- Owner: cabbage-ex
- Created: 2016-12-29T02:11:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-25T09:06:35.000Z (almost 2 years ago)
- Last Synced: 2025-10-07T00:46:48.750Z (9 months ago)
- Topics: cucumber, elixir, gherkin, parse
- Language: Elixir
- Homepage:
- Size: 118 KB
- Stars: 16
- Watchers: 6
- Forks: 9
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gherkin [](https://hex.pm/packages/gherkin)
[](https://coveralls.io/github/cabbage-ex/gherkin?branch=master)
[](https://circleci.com/gh/cabbage-ex/gherkin)
A Gherkin file parser written in Elixir. Parses `.feature` files and translates them to native Elixir terms for processing.
Extracted from https://github.com/meadsteve/white-bread
## Installation
The package can be installed as:
```elixir
def deps do
[{:gherkin, "~> 2.0"}]
end
```
## Example Usage
```elixir
%Gherkin.Elements.Feature{scenarios: scenarios} = File.read!("test/features/coffee.feature") |> Gherkin.parse()
# Do something with `scenarios`
# Also supports file streams for larger files (must read by lines, bytes not supported)
%Gherkin.Elements.Feature{scenarios: scenarios} = File.stream!("test/features/coffee.feature") |> Gherkin.parse()
```