
Ensure you have a computer (Windows or Mac), a solid grasp of JavaScript core concepts (variables, conditionals, loops), a basic code editor, and Nightwatch.js installed, with free resources available online.
Maximize learning by watching videos at the highest quality and following along with the course steps. Participate in the Q&A and avoid skipping lessons to prevent confusion.
Consolidates introductory material for all learners and guides you to Udemy Resources for UI automation videos, including HTML, JavaScript, Git basics, Node.js, and VS Code.
Visual Studio Code serves as a lightweight web development editor with built-in source control, a debugger, a terminal, and extensions like Pap IntelliSense to manage relative links.
Learn how to use node version manager to handle multiple node versions, install it on macOS or Windows, and switch between versions as needed.
Open Chrome and access developer tools. Use the Elements tab to inspect the page DOM and the Console to run JavaScript, including console.log.
Create a simple HTML refresher page in Visual Studio Code to review tags, elements, and attributes. Explore headings, paragraphs, lists, forms, inputs, links, and images to reinforce structure.
Link your HTML to a CSS file and apply colors using class and id selectors. Use div and h1 structures with descendant and child selectors, noting the uniqueness of ids.
Learn the JavaScript basics for test automation: console logging, variables, data types (strings, numbers, booleans, arrays), template literals, conditionals, for loops, and functions with parameters.
Explore JavaScript objects and JSON data by building objects with properties, accessing values with dot notation, defining methods with this, and understanding JSON rules for data and APIs.
JavaScript classes act as blueprints, using constructors to initialize instances and the new keyword to create objects. They support inheritance with extends and super and define methods like greeting.
Demonstrate how callback functions work in JavaScript by using setTimeout, showing function as a parameter and comparing traditional function syntax with arrow syntax.
Install Nightwatch.js by visiting the Nightwatch storage, run npm install --save-dev, verify node with node -v, and set up in Visual Studio Code for Nightwatch version 1.5.1.
Install Chrome driver, a web driver package for Chrome, via npm; review Nightwatch installation instructions for installing web drivers across browsers like Gecko Driver and Safari.
Ensure chrome driver versions match your chrome browser, verify your version quickly, and update the chrome driver in package.json with npm install.
Set up a Nightwatch configuration file in the project root to define the source folder, web driver, and chrome-specific test settings.
Learn to write your first nightwatch test by creating a tests folder, adding a sample test with module.exports and browser steps, and running it across platforms.
Build a nightwatch.js test from scratch using the exports interface and module.exports. Open a URL, wait for the body, and assert the title contains a given string.
Use Nightwatch's built-in BDD interface to write tests with describe and it blocks, then open a browser and verify the body is visible and the title contains the expected string.
Learn how before, after, before each, and after each hooks operate in Nightwatch, with demonstrations of when they run and how to log results.
Get text from page elements using a selector in Nightwatch.js, log the results to the console, and validate the username label. Use a timer to wait for element availability.
Explore how to interact with text fields in Nightwatch.js, including setting values, getting values, and clearing values for username and password with id selectors.
Learn how clicking elements in Nightwatch.js web application test automation triggers form interactions and validation, including clicking fields, pauses, and attempting to click disabled buttons to observe behavior.
Automate the Glitch IT login page with three Nightwatch.js tests: verify field error messages, test invalid login, then log in with provided credentials and run the tests.
Create and run Nightwatch.js tests for exercise one, including setting up a test file, checking username and password error messages, and validating valid and invalid login flows.
Learn to skip or selectively run tests in Nightwatch.js by organizing tests into folders, creating a skip tests file, and using skip, x-prefix, or dot-only to focus tests.
Choose which test file or case to run from the command line in Nightwatch.js, without changing your tests, using --test to target specific tests.
Learn to group tests by subfolders such as example and exercises, run a chosen group with the --group flag, and skip groups when needed.
Tag tests to run selectively by editing test files to add dot tags and supplying a tag in the run command; use a smoke tag to run only smoke tests.
Master navigating to urls in Nightwatch.js tests using browser url for a full url, initializing with a base launch url, or appending paths to that base.
Explore back, forward, and refresh navigation in Nightwatch.js tests by simulating browser navigation, loading pages, inserting pauses, and verifying refresh clears the username input field.
Learn how to get the page title in Nightwatch.js tests, using two methods: title() for a string and title.value() for an object, to verify you’re on the correct page.
Learning to automate web application testing shouldn't be hard!
In this course, I will be guiding you through the steps needed to create front-end web application test automation using Nightwatch.js. We will be using Version 1.7 of Nightwatch.js in this course. UPDATE: Tested working with Version 2.0
Together we will be writing scripts that automate the testing of front-end applications. Over 5 hours of interactive content, including 3 challenge exercises.
What we will cover:
Basic HTML, CSS, and JavaScript
Installing Nightwatch.js
Writing tests to:
Interact with elements
Validate data and existence of elements
Navigate and validate browser level properties
Alerts
Validations with verify, assert and expect
Page object model
Tagging and selecting tests for runs
What is front-end web application test automation?
The "front-end" refers to the user interface. Or in the case of web applications, the website. Everything that you can see and interact with is part of the front-end.
We automate the front-end to simulate the user experience of someone using the application. Through automation, we can pretend to be a user to make sure our site is working as expected.
What do I need to know to be successful in this course?
This course is designed for entry-level engineers. I will be going over everything that you need to get started being successful as a test automation engineer.
But here are a few things that will definitely help in your journey:
Experience with manual testing of web applications
Good Javascript experience (I will briefly review the important parts for this course)
Good HTML and CSS experience (I will briefly review the important parts for this course)
The most important thing to be successful is that you need to do the work. Don't skip videos unless you are 100% sure you know the material. You need to be coding right along with me every step of the way.
Why do we need front-end test automation?
Test automation of any kind is in high demand. The days of the manual test engineer is quickly coming to an end.
Companies want to deliver code more often and faster.
What does that mean?
The development cycle to build, test, and release code is becoming shorter. Having a constant delivery cycle is forcing teams to integrate automation into every part of the process.
The major parts of the cycle that need to be automated are:
- Build
- Release
- Unit Testing
- Regression Testing
QA is responsible for integration testing.
One of the most time-consuming parts of the development cycle is regression testing.
Teams spend hours or days re-testing features that they have already tested hundreds of times.
Why?
Changes in the codebase can cause downhill effects on other features. Things break all the time.
Never assume the code is always going to work!
For these reasons, we build automated tests.
I look forward to having you join my class!