Этот коммит содержится в:
gedi 2016-06-03 13:48:27 +03:00
родитель 726a451b7a
коммит 603066d939
2 изменённых файлов: 43 добавлений и 13 удалений

Просмотреть файл

@ -7,11 +7,14 @@
**The API is likely to change a few times before we reach 1.0.0** **The API is likely to change a few times before we reach 1.0.0**
**Godog** is an open source behavior-driven development framework for Package godog is the official Cucumber BDD framework for Golang, it merges
[go][golang] programming language. What is behavior-driven development, specification and test documentation into one cohesive whole. The author
you ask? Its the idea that you start by writing human-readable sentences is a core member of [cucumber team](https://github.com/cucumber).
that describe a feature of your application and how it should work, and
only then implement this behavior in software. What is behavior-driven development, you ask? Its the idea that you start
by writing human-readable sentences that describe a feature of your
application and how it should work, and only then implement this behavior
in software.
The project is inspired by [behat][behat] and [cucumber][cucumber] and is The project is inspired by [behat][behat] and [cucumber][cucumber] and is
based on cucumber [gherkin3 parser][gherkin]. based on cucumber [gherkin3 parser][gherkin].
@ -33,6 +36,31 @@ command. It even passes all your environment exported vars.
ensure that it is always compatible with the installed version of godog. ensure that it is always compatible with the installed version of godog.
So in general there are no vendor dependencies needed for installation. So in general there are no vendor dependencies needed for installation.
The following about section was taken from
[cucumber](https://cucumber.io/) homepage.
## About
#### A single source of truth
Cucumber merges specification and test documentation into one cohesive whole.
#### Living documentation
Because they're automatically tested by Cucumber, your specifications are
always bang up-to-date.
#### Focus on the customer
Business and IT don't always understand each other. Cucumber's executable
specifications encourage closer collaboration, helping teams keep the
business goal in mind at all times.
#### Less rework
When automated testing is this much fun, teams can easily protect
themselves from costly regressions.
### Install ### Install
go get github.com/DATA-DOG/godog/cmd/godog go get github.com/DATA-DOG/godog/cmd/godog

Просмотреть файл

@ -1,16 +1,18 @@
/* /*
Package godog is a behavior-driven development framework, a tool to describe your Package godog is the official Cucumber BDD framework for Golang, it merges specification
application based on the behavior and run these specifications. The features are and test documentation into one cohesive whole.
described by a human-readable gherkin language.
Godog does not intervene with the standard "go test" command and it's behavior. Godog does not intervene with the standard "go test" command and it's behavior.
You can leverage both frameworks to functionally test your application while You can leverage both frameworks to functionally test your application while
maintaining all test related source code in *_test.go files. maintaining all test related source code in *_test.go files.
Godog acts similar compared to "go test" command. It builds all package sources Godog acts similar compared to go test command. It leverages
to a single main package file and replaces main func with it's own and runs the a TestMain function introduced in go1.4 and clones the package sources
build to test described application behavior in feature files. to a temporary build directory. The only change it does is adding a runner
Production builds remains clean without any overhead. test.go file and replaces TestMain func if it was used in tests.
Godog uses standard go ast and build utils to generate test suite package,
compiles it with go test -c command. It accepts all your environment exported
build related vars.
For example, imagine youre about to create the famous UNIX ls command. For example, imagine youre about to create the famous UNIX ls command.
Before you begin, you describe how the feature should work, see the example below.. Before you begin, you describe how the feature should work, see the example below..
@ -39,7 +41,7 @@ Now, wouldnt it be cool if something could read this sentence and use it to a
run a test against the ls command? Hey, thats exactly what this package does! run a test against the ls command? Hey, thats exactly what this package does!
As youll see, Godog is easy to learn, quick to use, and will put the fun back into tests. As youll see, Godog is easy to learn, quick to use, and will put the fun back into tests.
Godog was inspired by Behat and the above description is taken from it's documentation. Godog was inspired by Behat and Cucumber the above description is taken from it's documentation.
*/ */
package godog package godog