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
0
votes
1 answer

Ginkgo skipped specs counted as failed

I've being using Ginkgo for a while and I have found a behavior I don't really understand. I have a set of specs that I only want to run if and only if a condition is available. If the condition is not available I want to skip the test…
0
votes
1 answer

How to write test case in multiple test file using ginkgo?

How to write test case in multiple test file using ginkgo? a_suite_test.go file: func TestA(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "A Suite") } a_test.go: var _ = Describe("A", func() { Context("A", func() { …
nameless
  • 2,015
  • 2
  • 11
  • 10
0
votes
1 answer

Right structure of tests files when used ginkgo/gomega for testing Go app

My Go app(restfull api service) is growing and i decided to use testing. My choise is Ginkgo/Gomega. Learning site (http://onsi.github.io/ginkgo/#getting-started-writing-your-first-test) i found that to start test you need goto the package ginkgo…
aleksandr
  • 77
  • 1
  • 10
0
votes
1 answer

Is it possible to emulate Example testing with Gomega?

I have some go tests that I would like to update to use Ginkgo for BDD style testing. The problem is, the server uses stdout and stderr for logging, and many of the tests utilize Go's built in "Example" testing framework as follows: import ( …
bbengfort
  • 5,254
  • 4
  • 44
  • 57
0
votes
1 answer

Asynchronous Testing With Stream Processing

I'm very new to Go, so I may be misunderstanding something foundational about Go's async/stream handling, but here goes... I'm trying to write some tests using ginkgo on a function I wrote that processes streams. The processing side reads in…
Jeff Allen
  • 17,277
  • 8
  • 49
  • 70
-1
votes
2 answers

Variable in It spec text always 0 although changed in BeforeEach in ginkgo/gomega

In my code snippet below or https://play.golang.org/p/tLld-zNF2zp, testValue was declared inside Describe block, changed in BeforeEach block. Then, used in. It Expect The test passes as expected. From the debug log, It always shows testValue…
AEWRocks
  • 157
  • 1
  • 2
  • 10
-2
votes
1 answer

Test a map[string]interface{} with ginkgo and gomega

During testing I get the error message Expected <[]map[string]interface {} | len:0, cap:0>: [] to equal <[]map[string]interface {} | len:0, cap:0>: nil How Do i declare a []map[string]interface {} to be "nil"? thank you
benwasin97
  • 203
  • 4
  • 12
1 2 3 4
5