Comments (13)
I haven't personally found the need for this but it shouldn't be too hairy to implement. My top priority, currently, is to get better output during parallel tests, but then I can have a try at this.
I'd probably go about this by polling the filesystem every (say) 1-2 seconds and checking timestamps/md5s. Do you think that would be adequate? Or would something fancier like https://github.com/howeyc/fsnotify be in order?
from ginkgo.
When I'm writing lots of tests I don't want to tab over to the terminal (or any other interface) just to run ginkgo -r (or any other command) again and again.
1-2 seconds is slow. Consider the existence of hundreds of tests. Worst case scenario is
save files
1 Mississippi
2 Mississippi
wait a couple of more seconds for the tests to run
It's conceivable one has to wait 5 or 6 seconds for the tests to run which is not good. Meanwhile I've moved on to new tests which are going to cause another 2 second delay (again worst case). At some point one would just have to sit back and wait for the tests to catch up which is not ideal.
I'm not saying I run all tests all the time. But running all tests does happen enough to make it a concern.
Love your work. I've learned a lot about Go from your code.
from ginkgo.
@ereichert I've made good progress on this and will push it to master in the next few days.
Here's the UI I'm planning on:
ginkgo -watch /path/to/package
will watch for changes in the specified package and rerun the tests if any are detected.
ginkgo -watch -r
will monitor all packages detected (recursively) under the current directory.
Any changes you make to any of those packages will automatically retrigger tests for those packages. (Note: if package A depends on package B and you change B ginkgo won't rerun A's tests -- just B's.)
One limitation to my current implementation: if you add a new package ginkgo -watch -r
won't automatically pick it up. You'll need to ^-C and restart the watch. In your opinion, is this OK?
from ginkgo.
[In your opinion, is this OK?] Beggars can't be choosers. But I appreciate you asking.
[ginkgo -watch /path/to/package] Awesome
[ginkgo -watch -r] Perfect
[if you add a new package] I can live with the new package constraint. It's a nice to have.
[Note: if package A depends on package B and you change B ginkgo won't rerun A's tests -- just B's.] This is the only concern I have. It's definitely the case I would want to rerun tests for packages dependent on package B but only those tests in the same project.
For instance, if I'm working on a project x and x is in my namespace com.me.x and that project has com.me.x.a and com.me.x.b packages then I would want the tests for com.me.x.a to run when com.me.x.b is changed. However if com.me.y.c depends on com.me.x.b and I'm not working on com.me.y.c then I wouldn't want the tests for com.me.y.c to run when com.me.x.b changes.
And as I type this I realize how complex that may be to implement.
I'll take what I can get.
Thanks for your work on this. I wish I had more time so I could help.
from ginkgo.
yep... that would be pretty complex ;)
i have ginkgo -watch
working on master now. give it a whirl and let me know if it's working for you!
from ginkgo.
Unfortunately, I don't get to use Go at my day job. I'll try to work with it as soon as I can.
Thanks again.
Eric Reichert
from ginkgo.
(ps github injecting your phone number into the comment so i figured i'd sanitize that out....)
from ginkgo.
hey @ereichert,
i just added a -notify flag. if you're on OSX you can brew install terminal-notifier
and ginkgo -r -watch -notify
will update you as tests run in the background using desktop notifications...
from ginkgo.
That's a cool addition. I had to work this weekend so I didn't have an opportunity to test the new stuff. Going to try it out this week.
from ginkgo.
Been using the new watcher and notify for the past hour. Both are pretty great.
Thanks for this. It's fantastic.
from ginkgo.
glad you like it! like i said, it's been growing on me too. thanks for the
suggestion.
On Mon, Jan 27, 2014 at 8:15 PM, Eric Reichert [email protected]:
Been using the new watcher and notify for the past hour. Both are pretty
great.Thanks for this. It's fantastic.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-33447862
.
from ginkgo.
Gonna close this up if that's OK with you @ereichert
from ginkgo.
It's working great thus far. Thanks for doing this.
from ginkgo.
Related Issues (20)
- ginkgo refuses to run pre-compiled test binary on Windows HOT 10
- Release Binaries HOT 1
- Doesn't show failed test case when -p option is set. HOT 1
- Grace period timeout occurred in ReportAfterSuite() HOT 4
- [Bug] File Handler Leak HOT 3
- WASM fails to compile due to ginkgo dsl
- Using label-filter to execute non labeled tests HOT 2
- Proposal: new decorador FlakeBackoff for more fine-grained control over flaked tests HOT 3
- How to build ginkgo in an intranet environment
- Tests that have not run end up in SpecStateSkipped in after suite report HOT 6
- Ginkgohelper does not work well with Eventually HOT 2
- Could not process Coverprofile for multi-module project HOT 1
- feature proposal: WhenTable HOT 2
- ginkgo outline doesn't honor --nodot option HOT 2
- explain cause of context cancelation HOT 2
- Don't skip tests that failed to compile HOT 1
- Merging coverage profiles leads lots of duplicated lines and uses lots of memory HOT 2
- GinkgoT: does not skip internal code by default HOT 1
- GinkoT().Error[f]: record error instead of aborting the test HOT 2
- Support for KeyValue atttributes in specs HOT 6
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.