18
Join The Darkside presented by seth mclaughlin Selenium testing with Nightwatch.js

Join the darkside: Selenium testing with Nightwatch.js

Embed Size (px)

DESCRIPTION

Learn about the Nightwatch.js project and how to get started using it to write Selenium tests, with JavaScript.

Citation preview

Page 1: Join the darkside: Selenium testing with Nightwatch.js

Join The Darksidepresented by seth mclaughlin

Selenium testing with Nightwatch.js

Page 2: Join the darkside: Selenium testing with Nightwatch.js
Page 3: Join the darkside: Selenium testing with Nightwatch.js

1. Project Overview

2. Features & Limitations

3. Hands On

Tonight’s talk

Page 4: Join the darkside: Selenium testing with Nightwatch.js

Nightwatch.js

learn more: www.nightwatchjs.org

Page 5: Join the darkside: Selenium testing with Nightwatch.js

created by

Andrei Rusu@beatfactor

learn more: www.linkedin.com/in/beatfactor

Page 6: Join the darkside: Selenium testing with Nightwatch.js

Selenium WebDriver Web BrowserTest Runner

HTTP

JAVA JAR

Test Script

Page 7: Join the darkside: Selenium testing with Nightwatch.js

Selenium WebDriver Web BrowserTest Runner

HTTP

JAVA JAR

Test Script

Page 8: Join the darkside: Selenium testing with Nightwatch.js

Selenium WebDriver Web BrowserTest Runner

HTTP

JAVA JARNode.js application

Test Script

Node.js module

Page 9: Join the darkside: Selenium testing with Nightwatch.js

Features★ Good documentation

★ Use CSS or XPATH selectors

★ Test runner can execute sequentially or in parallel

★ Test filtering by file name pattern, folders and tags

★ SauceLabs + BrowserStack support

★ Built in JUnit XML reporting

★ Extension model for custom commands

Page 10: Join the darkside: Selenium testing with Nightwatch.js

(current) Limitations➔ No built-in Page Object Model support

➔ Somewhat buggy in places

➔ Only one maintainer (beatfactor)

Page 11: Join the darkside: Selenium testing with Nightwatch.js

~6,000 downloads per month

~2,000 stars on github

~100 forks on github

learn more: www.npmjs.org/package/nightwatch

Page 12: Join the darkside: Selenium testing with Nightwatch.js

20 contributors

1 primary contributors (Andrei)

6 pending pull requests (oldest = 4.5.14)

30 open issues

158 closed issues

learn more: github.com/beatfactor/nightwatch

Page 13: Join the darkside: Selenium testing with Nightwatch.js
Page 14: Join the darkside: Selenium testing with Nightwatch.js
Page 15: Join the darkside: Selenium testing with Nightwatch.js
Page 16: Join the darkside: Selenium testing with Nightwatch.js
Page 17: Join the darkside: Selenium testing with Nightwatch.js

Get startedprerequisite: node.js

1. Use npm to install nightwatch

2. Download selenium-server-standalone.jar

3. Create Nightwatch config file

4. Create some tests

Page 18: Join the darkside: Selenium testing with Nightwatch.js

Resourcesdocumentationhttp://nightwatchjs.org/guide & http://nightwatchjs.org/api

sample codehttps://github.com/sethmcl/join-the-dark-side

nightwatch generator (quick start)https://github.com/sethmcl/generator-selenium-nightwatch

nightwatch page object modelhttps://github.com/sethmcl/nightwatch-pages