feature

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2022 License: MIT Imports: 10 Imported by: 0

README

boostrap-feature-tests

Build Status GoDevDoc Code lines Comments

This library helps to define a suite test for github.com/cucumber/godog.

Usage

Feature
# features/test.feature
Feature: Test boostrap feature run.

  Scenario: Test boostrap feature run
    When I boostrap feature
    Then I should have run
Configuration

Register the context, set the folder with the feature files to run the suite.

cnt := int64(0)

feature.RunFeatures(t, "features", func(_ *testing.T, s *godog.ScenarioContext) {
    s.Step(`^I boostrap feature$`, func() error {
        atomic.AddInt64(&cnt, 1)

        return nil
    })

    s.Step(`^I should have run$`, func() error {
        assert.Equal(t, int64(1), atomic.LoadInt64(&cnt))

        return nil
    })
})

Documentation

Overview

Package feature provides a bootstrap functionality to run feature test with godog.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunFeatures

func RunFeatures(t *testing.T, path string, featureContext func(t *testing.T, s *godog.ScenarioContext))

RunFeatures bootstrap and run feature tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL