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.
This 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
This 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 :)
I'm working on 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.
This 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?
"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".
...which was called such because the painting got dirty and buried under tons of varnish; the actual title is "The Company of captain Frans Banning Cocq and lieutenant Willem van Ruytenburch preparing to march out."
I'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)
We're having great success doing our integration tests without using Selenium.
At 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.
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)
Good 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?
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.
Can 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?
Selenium (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.
pip 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.
All of the web testing over here at SMART is done via Robot Framework. It's verbose and tricky to use sometimes, but it's entirely accessible to a number of people who are not developers and can be very productive in it.
I'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?
So 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?
reply