Skip to content

v1.0.0

Compare
Choose a tag to compare
@jaypipes jaypipes released this 25 Jul 22:52
· 89 commits to main since this release

Initial port of github.com/jaypipes/gdt-core and github.com/jaypipes/gdt merged into a single package.

To use gdt, define your tests in a YAML file or a directory containing YAML files, use the gdt.From() method to create a runnable test suite or scenario and then Run() it:

package mypackage_test

import (
	"context"
	"path/filepath"
	"testing"

	"github.com/gdt-dev/gdt"
	"github.com/stretchr/testify/require"
)

func TestRunASuite(t *testing.T) {
	require := assert.New(t)

	fp := filepath.Join("suite", "testdata", "exec")
	s, err := gdt.From(fp)
	require.Nil(err)
	
	s.Run(context.TODO(), t)
}

func TestRunOneScenario(t *testing.T) {
	require := require.New(t)

	fp := filepath.Join("suite", "testdata", "exec", "ls.yaml")
	s, err := gdt.From(fp)
	require.Nil(err)

	s.Run(context.TODO(), t)
}