8000 GitHub - corbym/jsonspec: JSON output for gogivens test framework
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

corbym/jsonspec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonspec

B
7981
uild status GoDoc Go Report Card Coverage Status

JSON output generator for the BDD framework GoGiven

Import:

import github.com/corbym/jsonspec

Usage:

package foo
import (
	"testing"
	"github.com/corbym/gogiven"
	"github.com/corbym/jsonspec"
	"os"
)

func TestMain(testmain *testing.M) {
	gogiven.Generator = jsonspec.NewTestOutputGenerator()
	runOutput := testmain.Run()
	gogiven.GenerateTestOutput()
	os.Exit(runOutput)
}

... actual tests...

Example Output

{
  "title": "Generator Test",
  "test_state": {
    "test title": {
      "test_results": {
        "id": "abc2124",
        "failed": true,
        "skipped": true,
        "test_output": "well alrighty then"
      },
      "test_title": "test title",
      "interesting_givens": {
        "faff": "flap"
      },
      "captured_io": {
        "foob": "barb"
      },
      "given_when_then": {
        "given_when_then": [
          "given",
          "when",
          "then"
        ],
        "comment": [
          "Fooing is best",
          "done with friends"
        ]
      }
    }
  }
}

About

JSON output for gogivens test framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0