6 ms·
Nightwatch.js
- deleted 13y ago[deleted]
- wlievens 13y agoOr Rembrandt paintings?
- yread 13y agoIn fact they specifically say Nightwatch got its name from the famous painting The Night Watch by Dutch painter Rembrandt van Rijn. The masterpiece is prominently displayed in the Rijksmuseum, in Amsterdam - The Netherlands. http://nightwatchjs.org/guide http://nightwatchjs.org/guide
- junto 13y agoWhat other names have you used then?
- pkmishra 13y agowhat benefit does it have in comparison to casperjs?
- neebz 13y agocasper works with phantomjs. nightwatch works with selenium.
- jffry 13y agoThis uses Selenium WebDrivers so that you can run your tests against actual browsers (instead of PhantomJS). Notably this means that you can run your tests in IE
- victorhooi 13y agoAlso, this is Node.js compatible - CasperJS is not.
- camus2 13y agowhatever casperjs is as compatible with nodejs as this stuff.This stuff uses selenium,it's not a stand alone solution.
- bevacqua 13y agoHow is it any different from wd.js?
- daleharvey 13y agoThis looks nice, but there are a lot of sugar libraries over the webdriver protocol, its the smallest part of the problem of real browser testing but it has lots of solutions, the real problems have almost 0 choice. What I really want is a selenium server 30MB, firefox speaks the webdriver protocol natively, I dont see why a proxy server to a browser needs to be 30MB (40 including chromedriver?, it pretty much needs to launch browsers and proxy requests, the project that launches the browsers should probably be its own project for that matter. If anyone can point me to a project working on that, I would highly appreciate it :)
- scriby 13y agoI'm working on https://github.com/scriby/browser-harness https://github.com/scriby/browser-harness. It's a little different in approach because it doesn't use selenium at all (rather it uses a websocket connection with the browser to control it). It's considerably more lightweight and compatible with all browsers you care about, but you can't do everything you can do with selenium. We've been using it for about 6 months at work and having good results.
- Scriptor 13y agoThis looks interesting and I have something I'd like to use it on, but the documentation could add a few things. How do I install this? How do I run a script?
- scriby 13y agoGood point. Check out https://github.com/scriby/browser-harness-bootstrap-tests https://github.com/scriby/browser-harness-bootstrap-tests for a full example. Browser harness itself is just a conduit between node and a browser - you need to provide the test framework yourself (mocha, vows, etc.).
- Scriptor 13y agoAwesome! I'm going to try it out now.
- sh1989 13y agoFor the codebase is dark and full of terrors.
- mattmanser 13y agoIs this a pun on the name, or a genuine critique of the source code? As having a quick scan of the source code, it looks very well written! Especially for javascript, not many people can write javascript well.
- mcintyre1994 13y agoI'm pretty sure it's a Game of Thrones pun :)
- sh1989 13y agoYes, 'tis a pun :)
- civild 13y agoDefinitely a pun, the "Night's Watch" is from Game of Thrones.
- a3_nm 13y agoIt could also be referring to the classic https://research.microsoft.com/en-us/people/mickens/thenightwatch.pdf https://research.microsoft.com/en-us/people/mickens/thenight...
- stingraycharles 13y agoBoth wrong; from the site: "Nightwatch got its name from the famous painting The Night Watch by Dutch painter Rembrandt van Rijn. The masterpiece is prominently displayed in the Rijksmuseum, in Amsterdam - The Netherlands". http://nightwatchjs.org/guide http://nightwatchjs.org/guide
- joemaller1 13y agoLooks similar to Angular's Protractor, but with more conventional (and easier to understand) syntax. Seems too easy not to try. https://github.com/angular/protractor https://github.com/angular/protractor
- mck- 13y agoI've been using Protractor for a month now and am eager to give Nightwatch a try: - debugger is awful, horrible stack dumps (sometimes just no stack info, you have no idea where the test failed) - very slow - selectors for ng-repeats are so hard to decipher (I still don't get them)
- bryanlarsen 13y agoWe're having great success doing our integration tests without using Selenium. At http://clara.io http://clara.io, our app is a fairly typical client-side Backbone.js app, so our integration tests can use standard backbone, mocha and jQuery constructs. Instead of using selenium, we use contructs like on('show'). The only thing that we actually use selenium for is for starting the browser from the command line.
- hesslau_ 13y agoOfftopic: the line > .waitForElementVisible("button[name=btnG]", 1000) in the demo test caught my attention - what is a good way to achieve this in production code? i.e. execute a function when a certain element which matches the query becomes visible? atm i'm using the DOMNodeInserted event (debounced) > $(document).on('DOMNodeInserted', _.debounce(function(e, ui) {}, 100);
- MDCore 13y agoTake a look at Mutation Observers. The only problem might be browser support: http://caniuse.com/#search=MutationObserver http://caniuse.com/#search=MutationObserver
- stirno 13y agoGood to see enough people interested in automation providers to make the front page. After a few years building/maintaining a similar library I've found the key is simplifying peoples lives but making sure they can still do 'everything'. Does Nightwatch implement the entire WebDriver JsonWire protocol or just the bits needed for the provided actions? Cool stuff
- briantakita 13y agoI've created a similar project that uses jasmine and formats the test cases into general purpose flows. The motivation is to economically (both in test suite run time and development time) test the system's many edge cases, including race conditions. https://github.com/btakita/jasmine-flow https://github.com/btakita/jasmine-flow It's only dependency is jasmine. I use it with jsdom, so I can test all > 95% client's edge cases in a reasonable amount of time and confidence of the software working. This allows me to run the entire test suite before commits on mature projects.
- j_s 13y agoCan anyone point me to a list of the various tools that automate web browsing (typically for automated testing) and the various layers of abstraction built on top of them?
- acomjean 13y agoSelenium (browser automating) might be what your looking for. The Boston PHP group had a talk this week on integrating Selenium, phantomJS (headless browser) and Jenkins (continuous integration). Its php based talk, but at the end he showed the javascript version of the same tests. https://github.com/balancerockmedia/boston-php-automated-testing https://github.com/balancerockmedia/boston-php-automated-tes...
- hpaavola 13y agopip install robotframework-selenium2library test.txt: *** Settings *** Library Selenium2Library *** Test Cases *** Google The Night Watch [Setup] Open Browser https://google.com Title Should Be Google Input Text q nightwatch Click Button Google Search Wait Until Page Contains The Night Watch [Teardown] Close All Browsers pybot test.txt Still haven't found anything that beats Robotframework when it comes to test automation. It's not just for web testing, it has many ready made libraries and creating your own is really easy. Check it out http://robotframework.org/ http://robotframework.org/
- jlipps 13y agoI'm surprised there's yet another JS implementation of the webdriver protocol. I wonder what was lacking in the existing frameworks from the author's perspective? disclaimer: I work on https://github.com/admc/wd https://github.com/admc/wd and https://github.com/jlipps/yiewd https://github.com/jlipps/yiewd, which are other webdriver clients for Node
- ChrisAntaki 13y agoThe API looks sweet. Looking forward to trying it out this weekend.
- mcantelon 13y agoSo similar to Soda (https://github.com/LearnBoost/soda https://github.com/LearnBoost/soda) by the looks of it, but with Selenium server management and CI support.
- malandrew 13y agoSo I'm about to get into building a large scale browser-based app testing solution, but the testing I'm doing isn't one of correctness, but of performance. This is a particularly persnickety problem since I need a solution where the probing itself doesn't introduce side effects that invalidate the test results. For example, many of the solutions I've seen use iFrames to isolate the test environment, but that introduces an entirely new and significant layer of redirection, especially when your results rely on GPU-related functions like CSS transforms. Can anyone who has done lots of browser based testing shed light on what solutions out there introduce the fewest or no side effects when probing?
- lun4r 13y agoAwesome! I wonder how easy it would be to integrate http://galenframework.com http://galenframework.com with this
- tlrobinson 13y agoI'm curious why they didn't build on the "wd" implementation of the WebDriver protocol for Node.js: https://github.com/admc/wd https://github.com/admc/wd Personally I like just using "wd" along with a promise helper library or two. Here's an example using q-proxy (https://npmjs.org/package/q-proxy https://npmjs.org/package/q-proxy) and q-step (https://npmjs.org/package/q-step https://npmjs.org/package/q-step). The result is a pretty nice syntax (admittedly nicer in CoffeeScript than JavaScript) and a lot more flexibility to do other logic: browser = QProxy(wd.promiseRemote("localhost", 4444)) QStep( -> browser.init(browserName: "firefox") -> browser.get("https://www.facebook.com/") -> browser.elementById("email").type(credentials.email) -> browser.elementById("pass").type(credentials.password) -> browser.elementById("u_0_b").click() ) Or wd's own built-in promise chaining is pretty similar to Nightwatch.js as well: browser .init({browserName:'chrome'}) .get("http://admc.io/wd/test-pages/guinea-pig.html") .title() .should.become('WD Tests') .elementById('i am a link') .click() .eval("window.location.href") .should.eventually.include('guinea-pig2') .back() .elementByCss('#comments').type('Bonjour!') .getValue().should.become('Bonjour!') .fin(function() { return browser.quit(); }) .done();
- JungleGymSam 13y agoIs there anything like this for an RDP connection?
- hodoublesy 13y agoThis is great, I've put together some examples/tests pretty easily - can't wait to dive in deeper. Any plans to integrate with Grunt.js?