ryanseddon / bunyip Goto Github PK
View Code? Open in Web Editor NEWAutomate client-side unit testing in real browsers using the CLI
Home Page: http://ryanseddon.github.com/bunyip/
License: MIT License
Automate client-side unit testing in real browsers using the CLI
Home Page: http://ryanseddon.github.com/bunyip/
License: MIT License
Setting up the config.js file is silly it should be a command option to run you through the options perhaps? Can anyone suggest an approach or help?
Hello!
When I run the command bunyip -f test.html local -l "safari"
it will launch Safari browser and then wait for the test execution, everything is ok with that.
If I try to run multiple QUnit test files with bunyip -f tests/*.html local -l "safari"
like I do on yeti, it won't launch the browser and it will just go to the "waiting for agents" state and I have to manually open Safari. If I open the browser and go to the test page and then begin the testing, It will only run one test file and then it completes and kills the server.
How should I run multiple test files? It's weird that the above command doesn't work since it's supported on yeti.
Create new command local
that will launch all locally installed browsers or specify which ones.
Launch all locally installed browsers.
bunyip -f test/index.html local
Launch Firefox, Chrome and phantomjs.
bunyip -f test/index.html local -l "firefox|chrome|phantomjs"
Launch the same three browsers and all iOS devices on browserstack.
bunyip -f test/index.html local -l "firefox|chrome|phantomjs" -b ios
I got this error when running bunyip config path/to/config.
Cannot find module '/Users/tinganho/code/bunyip/cli.js'
BrowserStack has a new API version https://github.com/browserstack/api/tree/v3
Rather than killing and re-opening workers everytime which is slooooow. Keep them open for re-use as long as BrowserStack will allow ~30mins.
I couldn't find any reference to the timeout parameter in the documentations and the default 300s limit is not enough for my tests.
Is it possible to change it? I tried the --timeout flag like on yeti but with no success.
Maybe I should change yeti's config and then bunyip will use it?
Have you thought of adding testswarm support to bunyip, in addition to yeti, which as we found here seems to have some drawbacks in our usage case. Specifically the fact that it doesn't seem to support php on server-side (I wonder if it can serve nodejs files at least) and we sometimes need to interchange messages with the server and test dynamic response, so absense of php support is kinda deal-breaking.
I know you said testswarm is more after-commit oriented and remember Reid Burke saying the same in his presentation of yeti, but then it's not. They have nice API and one is not constrained to when he wants to test anything, before commit, after commit or just on request. There's nodejs module for testswarm and an effort to integrate testswarm and browserstack.
This happens with both the stock config.js file and a custom one. Here's what I'm trying to run:
$ bunyip -f test/jasmine.html -b "firefox:win/4.0,5.0,6.0|iPad:ios/3.2"
BrowserStack iPad 3.2 worker launched: 208767
BrowserStack firefox 4.0 worker launched: 208768
BrowserStack firefox 6.0 worker launched: 208769
BrowserStack firefox 5.0 worker launched: 208770
And nothing happens. It hangs until I kill it. The status command shows they're running, however:
$ bunyip -s
Running:
iPad - 3.2 (208767)
firefox - 4.0 (208768)
Queued:
firefox - 6.0 (208769)
firefox - 5.0 (208770)
It works fine from a local browser, or if I run pagekite.py 9000 webxl.pagekite.me
before I run that command. I think node is failing to run pagekite.
I'm on OS X 10.7, node v0.6.18
Current behavior: Most of the local browser executables are looked in %PROGRAM FILES%.
However, almost all the browsers that are supported by bunyip are 32-bit browsers, which by default, are installed in %PROGRAM FILES(x86)%.
Note: Even though Internet Explorer supports both 32-bit and 64-bit browsers, the default browser is the 32-bit one, and hence might make more sense to use 32-bit browser in our case.
See here http://testling.com/docs#visit-a-page
I'll try and wrap this up and require a config setting to choose which service you want.
e.g.
config.browserservice = {
"browserstack": {
username: "", // Your BrowserStack username
password: "", // Your BrowserStack password
version: 2
},
"testling": {
username: "", // Your Testling username
password: "", // Your Testling password
}
};
Then behind the scenes work out which one you're using and send request to that.
Look at using Chocolatey to handle deps and powershell for scripting any installes needed. https://github.com/chocolatey/chocolatey
Firefox Release and Nightly channels are already supported, but support for Aurora channel is missing.
I figured following up here on the browser-launcher issue was the easiest way :)
As mentioned launchpad can also start Browserstack workers through pretty much the same API which looks something like this:
launch.browserstack({
username : 'user',
password : 'password'
},
function(err, browserstack) {
browserstack.browsers // -> List of all browsers
browserstack.ie('http://url', function(err, instance) {
// Shut the instance down after 5 seconds
setTimeout(function() {
instance.stop();
}, 5000);
});
});
It looks fairly similar and uses the same node browserstack package (however there is a new node-browserstack which also looks interesting). I use it in combination with the miner module that can start a localhost tunnelling service programmatically.
I like the way you clean launch local browsers. That's where Launchpad is still a little weak at the moment. Notable features, however, are probably the automatic browser location (if it is not in a standard path) and version discovery, the Browserstack V1 API server (to launch browsers on remote systems) and remote-preview support.
/cc @ekryski
Hi there,
I just updated bunyip, I run 0.2.2.
I'm not sure I'm set up correctly with browserstack.
I run the following command:
bunyip -f index.html -b ios
With the following config file:
var config = {
"browserstack": {
"username": "XXX",
"password": "XXX",
"timeout": 480
},
"port": 9000,
"tunnellink": "NAME.pagekite.me",
"tunnel": "pagekite.py <port> NAME.pagekite.me"
};
module.exports = config;
I also tried (with pagekite running manually):
"tunnel": "show <port> NAME.pagekite.me"
In both case, I get the log:
Creating a Hub. Open yeti --server
in another Terminal to reuse browsers for future batches.
Waiting for agents to connect at http://192.168.1.172:9000
...also available locally at http://localhost:9000
When ready, press Enter to begin testing.
null
BrowserStack iPad 3rd (6.0) 6.0 worker launched: 409331
BrowserStack iPad 2 4.3.2 worker launched: 409332
BrowserStack iPad 2 (5.0) 5.0 worker launched: 409333
BrowserStack iPad 3rd 5.1 worker launched: 409335
BrowserStack iPad 3.2 worker launched: 409334
BrowserStack iPhone 3GS 3.0 worker launched: 409336
BrowserStack iPhone 4S 5.1 worker launched: 409337
BrowserStack iPhone 4S (6.0) 6.0 worker launched: 409338
BrowserStack iPhone 4 4.0 worker launched: 409339
BrowserStack iPhone 5 6.0 worker launched: 409340
But nothing is happening.
If I open a browser on localhost:9000 or NAME.pagekite.me, I can see the connection in the log.
So I guess it is just the browsers in the browserstack VM that are not connecting?
Any idea?
I also don't understand why we need the param "-f index.html" with browserstack.
Is that a file path that is appended to the tunnel?
like: http://NAME.pagekite.me + "/" + "index.html"?
Thanks for any help!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.