cucumber / cucumber/godog

Executing a specific ginkgo test from a godog step

Open
#185 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.7k
Forks
280
Avg merge
2d 20h
Merged PRs (30d)
2

Description

I'm exploring adding Gherkin support for kubernetes to separately define our behaviours/features from our tests.

We currently make heavy use of Ginkgo, and much of our infrastructure is based on it.

I'd like create a set of .features referencing our existing tests, while allowing us to make use of Feature:, Scenario:, and tagging via Gherkin. It would help projects like ours that already use ginkgo, but would like to benefit from separating BDD files from the implementations.

Feature: Use existing ginkgo framework
  As a test contributor
  I want to not throw away all our old tests
  In order to retain the value generated in them
  @ginko @k8s.io @Conformance @NodeConformance
  Scenario: Container Lifecycle Hook when create a pod with lifecycle hook should execute poststart exec hook properly
    Given existing test "[k8s.io] Container Lifecycle Hook when create a pod with lifecycle hook should execute poststart exec hook properly [NodeConformance] [Conformance]"
    When I run the test
    Then the existing test will pass
    And this is fine
  @ginko @k8s.io @NodeConformance
  Scenario: Container Runtime blackbox test when running a container with a new image should be able to pull from private registry with secret
    Given existing test "[k8s.io] Container Runtime blackbox test when running a container with a new image should be able to pull from private registry with secret [NodeConformance]"
    When I run the test
    Then the existing test will pass
    And this is fine

I'm exploring this via https://github.com/kubernetes/kubernetes/pull/79914

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides Gherkin examples but names no godog files, tests, or entry points to change. Start by reviewing the existing Ginkgo usage and the linked Kubernetes pull request 79914. Done would require a decided approach for referencing and executing existing Ginkgo tests from Gherkin steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.