Comments (6)
Interesting idea.
Maybe we can include some config/options refactoring... For example, the fact that phantom has some specific options and cannot be started like other browsers bothers me. A ghostdriver starter task piped into a webdriver task would make more sense I think.
Also, when trying to have custom reporter for selenium/saucelabs tasks, I didn't find a nice way to reuse existing mocha reporters (because the mocha output would be messed up if concurrency option is > 2). So I had to copy/paste the mocha team-city-reporter and replace console.log() by some array.push() to accumulate the logs... What if we spawn each browser tests in a separate process and read the output and error streams? ...And we fail the task if one of the spawned process fails...
I hope that what I just wrote is "understandable". Those are just ideas off the top of my head.
from grunt-mocha-webdriver.
I'd welcome a gulp plugin. Because there are none, I am (unfortunately) sticking with grunt.
from grunt-mocha-webdriver.
"A ghostdriver starter task piped into a webdriver task would make more sense I think." - This is awesome, but I think would be difficult in a grunt version. (Great gulp use case, though.)
"What if we spawn each browser tests in a separate process and read the output and error streams?" -> Awesome idea. Do you want to take a crack at it? And we can use the branch with those changes as the basis for the grunt/gulp agnostic version.
from grunt-mocha-webdriver.
In grunt, we cannot pipe, you are right. But we could have a startGhostdriver task with option {name: 'myPhantomProcess'}
and a stopGhostdriver task with the same name
option value...Too hackish maybe?
For the 'spawn' refactoring, I can give it a try, but I cannot commit to a date. Super busy at work...
from grunt-mocha-webdriver.
@saadtazi Me too, that's why I asked if you wanted to do it :-D
We'll leave this open as a cool thing to do, should we ever get the time. (Or the need to switch to a gulp workflow.)
from grunt-mocha-webdriver.
@jmreidy I have an working version of this in a branch: https://github.com/saadtazi/grunt-mocha-webdriver/compare/spawn-process?expand=1
It still needs some "love" and the changes are quite important.
Note that I didn't find a way to keep mocha output colors from the parent process when buffer is required (tried different techniques...), because the child process tty.isatty() is false
.
Any comments are welcome...
from grunt-mocha-webdriver.
Related Issues (20)
- upload
- ECONNREFUSED on file upload HOT 11
- Grunt task hangs on ECONNREFUSED HOT 1
- Release patch version to npm HOT 2
- [feature] See a progress bar HOT 2
- kill() does not fire close event HOT 3
- Move Release History from README.md to History.md HOT 5
- Automatically restart Sauce Connect
- Switch out wd.js for leadfoot HOT 4
- Spawn mocha as a child process HOT 3
- How can I configure the retryDelay parameter? HOT 3
- .setWindowSize no effect on latest PhantomJS HOT 1
- selenium launcher dependency causes failures when behind a firewall that blocks git protocol HOT 1
- Use SauceLabs without Sauce Connect tunnel? HOT 4
- Mocha failures do not cause grunt build to fail
- Use mocha 2
- Custom host server Question
- Implement concept of Adapters HOT 1
- Docs - code example required
- [Question] selenium-webdriver instance instead of wd.js HOT 1
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 grunt-mocha-webdriver.