acceptance

package
v0.0.0-...-0063db8 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2015 License: CC0-1.0 Imports: 3 Imported by: 0

README

Acceptance testing

How to add a new test set for a feature

  • Make sure you have agouti and ginkgo installed
    • go get github.com/sclevine/agouti
    • go get github.com/onsi/ginkgo/ginkgo
  • Generate the test set skeleton
    • ginkgo generate --agouti your_feature_name
  • Add acceptance test tag to the top of the file. Make sure this line is at the top and it separated by an empty line before the next non-empty line.
    • // +build acceptance
  • Change the package from acceptance_test to acceptance
  • Remove this unnecessary import (. "github.com/18F/cf-deck/acceptance") that is generated by ginkgo

Helpers

  • There is a startServer() function which will start a go test server and return it. Make sure you run close() on it when done.
  • There is a createPage() function that creates a page for you. Make sure to run Expect(page.Destroy()).To(Succeed())
  • More helpers reside in cf_console_suite_test.go file

Running the tests

  • Make sure you have CONSOLE_TEST_USERNAME, CONSOLE_TEST_PASSWORD, CONSOLE_TEST_ORG_NAME, CONSOLE_TEST_SPACE_NAME, CONSOLE_TEST_APP_NAME, CONSOLE_TEST_HOST, and CONSOLE_TEST_DOMAIN set in your environment.
    • This represents a username and password for the test to browse through with.
  • Run go test ./... --tags acceptance

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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