hedhyw / gherkingen Goto Github PK
View Code? Open in Web Editor NEWBehaviour Driven Development tests generator for Golang
License: MIT License
Behaviour Driven Development tests generator for Golang
License: MIT License
Now the application can return JSON representation of template object if flag -format
is set to json
, but it will be nicer if the object will be documented.
docker run --rm -it --read-only --network none hedhyw/gherkingen:latest -version
Prints:
github.com/hedhyw/gherkingen@
FYI: https://github.com/go-task/task/tree/master/.github/workflows
"hello world" -> "hello_world"
"hello_world" -> "hello_world"
Input:
Feature: Issue example
Scenario: Just a hello world
Examples:
| <name> |
| hello world |
Generates:
testCases := map[string]testCase{
"hello world": {"hello world"},
}
Expected:
testCases := map[string]testCase{
"hello_world": {"hello world"},
}
main.version={{.Version}}
issues:
fix: true
exclude-rules:
- linters:
- thelper
source: "^.*f\\.Scenario.*$"
Consider default output format by an extension of the template.
Id -> ID
Http -> HTTP
Url -> URL
Ip -> IP
Json -> JSON
Yml -> YML
Yaml -> Yaml
Xml -> XML
Ok -> OK
Add func(_ *testing.T, f *bdd.Feature)
if there are test cases.
> [linux/386 builder 5/5] RUN make build OUT_PATH=/build/bin/gherkingen VERSION=v2.4.0:
#0 0.168 building v2.4.0
#0 0.171 go build \
#0 0.171 -o /build/bin/gherkingen \
#0 0.171 --ldflags "-s -w -X main.version=v2.4.0" \
#0 0.171 cmd/gherkingen/main.go
#0 0.920 # runtime/cgo
#0 0.920 cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in $PATH
CLI option that will include t.Parallel()
to blocks.
go install github.com/hedhyw/gherkingen/v2/cmd/gherkingen@latest
gherkingen --version
github.com/hedhyw/gherkingen@unknown
Input:
Feature: Example
Details:
- example 1
- example 2
- example 3
Generates:
func TestExample(t *testing.T) {
f := bdd.NewFeature(t, "Example")
/* Details:
- example 1
- example 2
- example 3 */
}
Expected:
func TestExample(t *testing.T) {
f := bdd.NewFeature(t, "Example")
/*
Details:
- example 1
- example 2
- example 3
*/
}
Build and push the docker image with a binary included.
This is a great library, I would like to use it in my projects.
But I think it has a bug, it doesnt really support JS. It should also be able to generate code in JS with Jest or Mocha, maybe both, depending on given parameters.
And publish it on npm, it's a lot easier to install libraries from there.
Please fix it ASAP, thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.