Comments (5)
I just tried this on my laptop with a simple example and it worked. Can you
point me to a code example that's failing for you?
Onsi
On Tuesday, February 4, 2014, Tim Jarratt [email protected] wrote:
I was very surprised to discover that Ginkgo will only run the tests that
are defined in the same package as the suite_test. Seems like a bug, but I
would also accept that this is a feature (because it forces you to write
your tests in the name_test package.Alternatively, if this is hard to solve, a warning would be very nice.
Reply to this email directly or view it on GitHubhttps://github.com//issues/31
.
from ginkgo.
I took a closer look and the behavior was a little surprising. It appears to work for some cases, but not others.
cloudfoundry/cli@c197cd5 seems to exhibit this behavior for domain_test.go
in the cf
package
from ginkgo.
Methinks this is because the only file in the cf_test
package is cf_suite_test.go
itself and cf_suite_test.go
does not reference any of the cf
package files at all.
A simple fix for this might be to add
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
_ "cf"
"testing"
)
to the cf_suite_test.go
file (this could be made the default in the ginkgo bootstrap
command, we'd also need to add it to ginkgo convert
). This would import the cf
package purely for its side effects (in this case, the side effects involve registering the ginkgo tests in that package!)
from ginkgo.
I wasn't aware you could import a package as _
. That's ... interesting.
With that information, this doesn't sound like a real bug per se. It's already conventional to put your tests in a separate package from your package under test, so I would be willing to chalk this up to user error and consider this issue closed.
from ginkgo.
Coo :)
Yeah... _ is interesting.............
On Feb 6, 2014, at 9:47 PM, Tim Jarratt [email protected] wrote:
I wasn't aware you could import a package as _. That's ... interesting.
With that information, this doesn't sound like a real bug per se. It's already conventional to put your tests in a separate package from your package under test, so I would be willing to chalk this up to user error and consider this issue closed.
—
Reply to this email directly or view it on GitHub.
from ginkgo.
Related Issues (20)
- Detail Skipped reason when spec is skipped by cli arguments HOT 6
- Support customizing the SpecContext HOT 4
- ginkgo v2 leaks goroutine HOT 3
- Proposal: RunSpecsWithContext? HOT 14
- Add option to StandardReporter to display things better on github actions HOT 2
- Call dynamic variables through 2 test files. HOT 1
- Skip each test function logs and print in summary HOT 1
- Run a single suite with N instances in parallel with different `BeforeSuite` Setup. HOT 3
- Feeding report back for focusing on failed test-cases HOT 1
- Junit report should have system-out HOT 1
- could not log in Eventually with fmt.Fprintf(GinkgoWriter) HOT 3
- Question: One Suite to rule them all HOT 2
- when using concurrency, a test case failure in a background go routine does not show which test case failed HOT 3
- Add cli flag to fail when no tests were run HOT 1
- `ginko -p 2` does not complain about having an extra argument
- How to integrate with xgo? HOT 6
- when watching, add ability to ignore hidden files (including tests!) HOT 5
- Report Portal and Gingko integration plugin
- Implement generic transformer decorator: ginkgo.ContextTransformer
- why can't generate html report?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ginkgo.