nightwatch.js

844 views
Skip to first unread message

bootstrap online

unread,
Jan 31, 2014, 12:17:22 PM1/31/14
to appium-...@googlegroups.com
http://nightwatchjs.org/

Would it make sense to use nightwatch for appium's tests? It seems
very readable.

Jonathan Lipps

unread,
Jan 31, 2014, 12:21:12 PM1/31/14
to bootstrap online, appium-...@googlegroups.com
It seems more or less the same to me as how our tests look after the rewrite @sebv just did. I haven't deeply evaluated the Nightwatch API, but I don't see a lot of big differences. Maybe @sebv has some more thoughts.
> --
> http://appium.io
> ---
> You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
> Visit this group at http://groups.google.com/group/appium-discuss.
> For more options, visit https://groups.google.com/groups/opt_out.

bootstrap online

unread,
Jan 31, 2014, 12:23:25 PM1/31/14
to Jonathan Lipps, appium-...@googlegroups.com
I'm not suggesting the tests be rewritten again. I'm curious to find
out how it compares with @sebv's new approach.

Sebastien Vincent

unread,
Feb 2, 2014, 9:14:22 AM2/2/14
to appium-...@googlegroups.com, Jonathan Lipps
The apis looks similar but there are some core differences:

Nightwatch / WD.js:
- queue based chain / promise
- home cooked asserters / chai+chai-as-promised (or else)
- nodeunit / mocha (+mocha-as-promised) (or else)

The queue based chain is a bad pattern when async call are involved, as soon as you try to do something complex, or compose a bit, you end up having to manually halt the queue and insert tasks manually (But maybe NightWatch will prove me wrong). We use to have a chain api like this in WD.js and there were so many issues, that it led me to reimplement the chaining using promises.

Nightwatch is far for mature, just have a look at the http protocol, no retry, no timeout setting, content/length+content-type in GET and DELETE. It is going to break pretty quickly in non-straightforward cases like sauce-connect or queuing. 

The greatest thing about Nightwatch is the website/doc, and it is really good, should try to emulate that.
Reply all
Reply to author
Forward
0 new messages