💡 Skip to
Step 2
if using Gitpod
-
After cloning, install dependencies:
npm install
-
Run the example tests
npm run wdio
💡 If using Gitpod, open Port
6080
to see the test(s) running
Opening an existing project can be daunting, but there are a few places to look first to get a handle on what's going on.
💡 By default, WDIO uses the
PageObject
andspec
patterns along with theMocha
test framework for their Automation.
-
The
/test
directory would be the first place to look for things that matter:/specs
- the test files that use the Page Objects
-
In this project, we are testing DemoQA.com, so look at the
/demoqa
directory/demoqa
- any files, like Page Objects, that are relevant to our web app
-
The
wdio.conf.js
configuration file is where you can define settings for your test automation
In VS Code, you can turn on debugging via the Command Palette:
-
Open Command Palette
- Mac:
SHIFT + COMMAND + P
- Windows:
SHIFT + CTRL + P
- Mac:
-
Search for
Debug: Toggle Auto Attach
-
Select
Always
💡 Now you can add breakpoints to your test! Run the test normally and observe the test stops at your breakpoint with controls to Continue
, Step Over
, and even inspect variables!