openshift/onsi-ginkgo

Name: onsi-ginkgo

Owner: OpenShift

Description: BDD Testing Framework for Go

Forked from: onsi/ginkgo

Created: 2017-09-29 19:16:59.0

Updated: 2018-02-28 20:15:02.0

Pushed: 2018-03-21 17:12:23.0

Homepage: http://onsi.github.io/ginkgo/

Size: 4979

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Ginkgo: A Golang BDD Testing Framework

Build Status

Jump to the docs to learn more. To start rolling your Ginkgo tests now keep reading!

If you have a question, comment, bug report, feature request, etc. please open a GitHub issue.

Feature List
Gomega: Ginkgo's Preferred Matcher Library

Ginkgo is best paired with Gomega. Learn more about Gomega here

Agouti: A Golang Acceptance Testing Framework

Agouti allows you run WebDriver integration tests. Learn more about Agouti here

Set Me Up!

You'll need Golang v1.3+ (Ubuntu users: you probably have Golang v1.0 – you'll need to upgrade!)

et github.com/onsi/ginkgo/ginkgo  # installs the ginkgo CLI
et github.com/onsi/gomega         # fetches the matcher library

ath/to/package/you/want/to/test

go bootstrap # set up a new ginkgo suite
go generate  # will create a sample test file.  edit this file and add your tests then...

est # to run your tests

go  # also runs your tests
I'm new to Go: What are my testing options?

Of course, I heartily recommend Ginkgo and Gomega. Both packages are seeing heavy, daily, production use on a number of projects and boast a mature and comprehensive feature-set.

With that said, it's great to know what your options are :)

What Golang gives you out of the box

Testing is a first class citizen in Golang, however Go's built-in testing primitives are somewhat limited: The testing package provides basic XUnit style tests and no assertion library.

Matcher libraries for Golang's XUnit style tests

A number of matcher libraries have been written to augment Go's built-in XUnit style tests. Here are two that have gained traction:

You can also use Ginkgo's matcher library Gomega in XUnit style tests

BDD style testing frameworks

There are a handful of BDD-style testing frameworks written for Golang. Here are a few:

Finally, @shageman has put together a comprehensive comparison of golang testing libraries.

Go explore!

License

Ginkgo is MIT-Licensed

Contributing

Since Ginkgo tests also internal packages, when you fork, you'll have to replace imports with your repository.
Use before_pr.sh for that
After you finished your changes and before you push your pull request, use after_pr.sh to revert those changes


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.