Image for post
Image for post
Courtesy Pixabay: https://pixabay.com/en/cog-wheels-gear-wheel-machine-2125169/

Primer on Front End Automation

Nidhi Sadanand
Jul 27, 2018 · 6 min read

First the Frameworks

The Page Object Model

elements
commands
page

The Actors in our Setup

Image for post
Image for post
Entities in an automation

Setting it Up

21:39:35 [WARN] [Nightwatch Extra] getEl saw selector .new-order-item-select-container but result length was 26, with 26 of those :visible

project_root/test/automation
--conf (for configuration files)
--lib (for pageobject models)
---pages
----commands
----elements
----sections
--mocks (for mocks if applicable)
--scripts (bash/csh scripts for command line)
--tests (where the actual tests are)
"async": "0.9.2",
"chromedriver": "2.35.0",
"config": "1.30.0",
"dpro": "1.2.0",
"event-stream": "3.3.4",
"jsonlint": "1.6.2",
"nightwatch": "0.9.9",
"phantomjs": "^2.1.7",
"phantomjs-prebuilt": "2.1.16",
"ps-tree": "1.1.0",
"selenium-server": "3.9.1",
"testarmada-magellan": "10.1.1",
"testarmada-magellan-admiral-plugin": "^3.0.0",
"testarmada-magellan-local-executor": "2.0.0",
"testarmada-magellan-nightwatch-plugin": "7.0.0",
"testarmada-nightwatch-extra": "5.0.0",
"testarmada-renv": "4.1.0",
"webpack-dev-server": "1.16.2"

magellan.json — snippet
nightwatch.json

The Test!

Sample Test

Test Inheritance

Debugging Test Failures

Large Scale Testing using SauceLabs

In Conclusion

Walmart Global Tech Blog

We’re powering the next great retail disruption.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store