Categorygithub.com/tigh-latte/go-bdd
modulepackage
0.0.16
Repository: https://github.com/tigh-latte/go-bdd.git
Documentation: pkg.go.dev

# README

Go BDD

A cucumber framework for writing integration tests via go-dog.

This library's goals are to provide:

  • An easily importable/executable bdd interface.
  • An set of basic test steps which can be uses, or have new tests built from.
  • An config which can be overridden to point be ran against different environments.

Creating the test runner

Getting setup is simple enough, you create a directory in your project to house your tests:

$ mkdir -p test/integration

Next, you would create a runner file ending in _test.go, and insert the following into it:

//go:build integration

package integration

import (
	"os"
	"testing"

	"github.com/tigh-latte/go-bdd/cucumber"
)

func TestMain(t *testing.M) {
	suite := cucumber.NewSuite(
		"my-cool-service",
	)

	os.Exit(suite.Run())
}

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MONGO FUNCTIONS.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UseAuthentication set pre configured authentication.
WithAfterScenario executes the provided function after each scenario execution, providing `cucumber.TestContext`, `godog.Scenario`, and an `error` if one occured.
WithAfterStep executes the provided function after every step, providing the `cucumber.TestContext`, `godog.Step`, and any `error` that occured during the step.
WithAfterSuite executes the provided function before suite execution.
WithAlwaysIgnoreFromResponse specific a list of keys via jsonpath to be ignored from every http response.
No description provided by the author
WithBeforeScenario executes the provided function before each scenario execution, providing `cucumber.TestContext` and `godog.Scenario`.
WithAfterStep executes the provided function before every step, providing the `cucumber.TestContext`, and the `godog.Step`.
WithBeforeSuite executes the provided function before suite execution.
WithCustomRequireFuncs add custom funcs to be executed via `@require=` tags, before a scenario is ran.
WithCustomSteps takes a function which loads custom steps.
WithCustomTemplateFuncs add custom functions to the template engine.
WithDockerCompose stack.
WithDockerComposeEnv apply an env to the provided stack.
WithDockerComposeWaitFor wait for a service to be read on Up.
No description provided by the author
WithDynamoDBTestData takes an `fs.FS` of which to retrieve sqs message bodies from.
No description provided by the author
WithGlobalHTTPHeaders specific a list of keys via jsonpath to be ignored from every http response.
WithGooglePubSub pubsub.
WithGooglePubSubTestData takes an `fs.FS` of which to retrieve Google PubSub message bodies from.
WithGRPC FUNCTIONALITY NOT IMPLEMENTED YET.
WithHTTPData takes an `fs.FS` of which to retrieve http requests and responses.
No description provided by the author
WithMongoData takes an `fs.FS` of which to retrieve mongo document data.
No description provided by the author
WithRabbitMQTestData takes an `fs.FS` of which to retrieve rabbitmq message bodies from.
No description provided by the author
WithSQSTestData takes an `fs.FS` of which to retrieve sqs message bodies from.
WithTestData takes an `fs.FS` of which to retrieve testing data from.
No description provided by the author
No description provided by the author
WithWebsocketsTestData takes an `fs.FS` of which to retrieve websocket message bodies from.

# Constants

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
Store for storing.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author