Questions tagged [ginkgo]

Ginkgo is a BDD-style Golang testing framework built to help you efficiently write expressive and comprehensive tests.

About

Ginkgo is a BDD-style Golang testing framework built to help you efficiently write expressive and comprehensive tests. It is best paired with the Gomega matcher library but is designed to be matcher-agnostic.

Links

67 questions
1
vote
0 answers

Things to be taken care Before Running Stellar Horizon Test Cases

I have cloned the Stellar Horizon Repo from GitHub written in Go. I thought to run the test cases first.where the test cases have been written by using GINKGO Testing Framework. I have been running the test cases using ginkgo command eg : ginkgo…
1
vote
0 answers

Passing multiple test data to ginkgo test.go file

I have a test method like below: It("test description", func() { expectcc.ResponseOk(name.Invoke(`issue`, &cpaper.test{ Issuer: IssuerName, PaperNumber: "0001", IssueDate: time.Now(), MaturityDate:…
Vasanthi
  • 37
  • 6
1
vote
1 answer

ginkgo cleanup on failure

I am writing my test specs in Ginkgo. My tests have the following structure: It("Setup X, Y, Z resources and check conditions" func() { // setup resources. // assert certain conditions using //cleanup resources }) My question is, how…
SeattleOrBayArea
  • 2,808
  • 6
  • 26
  • 38
1
vote
1 answer

False positive when sending SIGTERM to Ginkgo test suite

While writing tests using Ginkgo framework I noticed, that pressing C-c to terminate a running suite generates false positive. note the green "1 Passed" When you look at the code you will notice this test should fail after 5 seconds. When I…
karmazyn
  • 11
  • 1
1
vote
2 answers

Ginkgo package testing

I'm implementing test suite for brand new go app and decided to use ginkgo. The app has main function and several packages . |- main.go |- types | |-- user.go | |-- post.go |- server_pkg | |-- users_controller.go | |-- posts_controller.go |-…
Artem
  • 354
  • 1
  • 3
  • 8
1
vote
1 answer

How to install ginkgo and gomega using gopkg?

I am trying to install ginkgo and gomega using the gopkg. It is throwing the following error: src/gopkg.in/onsi/ginkgo.v1/ginkgo_dsl.go:24:2: use of internal package not allowed src/gopkg.in/onsi/ginkgo.v1/ginkgo_dsl.go:25:2: use of internal…
hemanik
  • 965
  • 3
  • 14
  • 33
1
vote
1 answer

go test prints output only after tests have finished

I noticed that go test seems to print to stdout after tests have finished. I'm not sure if this is go test's issue, or because I am using ginkgo as well. Does anyone know how to make it print output as the tests run?
stackoverflower
  • 3,885
  • 10
  • 47
  • 71
1
vote
2 answers

Retrieve the session ID in *agouti.webdriver for Golang

I want to use the session id while creating a new WebDriver with Agouti to pass it to SauceLabs for status update. Commands Used: url := fmt.Sprintf("http://%s:%s@ondemand.saucelabs.com/wd/hub", username, accesskey) page,err :=agouti.NewPage(url,…
Anvesh
  • 149
  • 1
  • 8
1
vote
1 answer

Gikngo Tests hang during goapp tests

I'm trying to use Gikngo to write some tests for appengine. My setup for the tests is as follows: suite_test.go: BeforeSuite() { inst, err = aetest.NewInstance(options) if err != nil { Fail(fmt.Sprintf("%s", err)) } } var( req…
Shaunak Godbole
  • 121
  • 1
  • 4
1
vote
1 answer

Gomega ghttp returns 500 status code

I've written some tests in Go using Ginkgo/Gomega, but no matter what I do, ghttp returns a 500 status to my client with no content. Here is some sample code: var _ = Describe("Client", func() { var ( server *ghttp.Server ) …
bbengfort
  • 5,254
  • 4
  • 44
  • 57
1
vote
0 answers

Provide Terminal Input to `gexec.Session`

I need to provide input to an exec.Command that is started by Gomega's gexec.Session. The command I'm executing is currently complaining that "stty: stdin isn't a terminal". How can I provide input to the spawned process that looks like it comes…
DeejUK
  • 12,891
  • 19
  • 89
  • 169
1
vote
1 answer

No output from Golang Ginkgo BeforeSuite

I have the following Ginkgo test file: package foo import ( "log" . "github.com/onsi/ginkgo" ) var _ = BeforeSuite(func() { log.Print("BeforeSuite") }) var _ = AfterSuite(func() { log.Print("AfterSuite") }) var _ =…
Ralph
  • 31,584
  • 38
  • 145
  • 282
1
vote
0 answers

Go, go_appengine, and agouti - how?

I'm building a small app in Go running on Google Appengine. I've got it running locally, with tests using aetest. Works great. I'd like to add BDD tests using Agouti. What I'm trying to understand is how Agouti can work with aetest. My Agouti tests…
Jim Hopp
  • 11
  • 3
0
votes
0 answers

How to populate environment variable section in allure report while serving a junit report generated by Ginkgo framework?

I'm using Ginkgo to run some tests written in Golang. ginkgo -r --keep-going --junit-report=report_all.xml -v After the run completes I get a nice visualization using allure serve Before running my tests I set some environment variables which are…
0
votes
1 answer

Execution failing with go error for acceptance tests

I am trying to execute acceptance testing (AATs), But when eveni try to use ginkgo command or make aat, it fails with below go error : lisha@admin-bld-box:$ ginkgo Failed to compile topology-middleware: go: unknown flag -i cannot be used with…