-
Notifications
You must be signed in to change notification settings - Fork 2
Creating a new WebdriverIO testscript
tpronk edited this page Apr 29, 2021
·
3 revisions
Home - WebdriverIO testing - Creating a new WebdriverIO test - Creating a new WebdriverIO testscript
To get started, see this existing test: tests/wdio_img
- Give your testscript the same name as your test experiment, for example
e2e_img.cjs - Save your testscript in same directory as where your test experiment is:
./test/tests_e2e - Have your testscript import
../shared/SharedBehaviors.cjs - The testing testscript should be a CommonJS module that exports a function
runwhich accepts one argument:calibration
Inside of your testscript, you've got the following features at your disposal:
- The WebDriverIO API for sending commands to a web-browser. Since PsychoJS draws stimuli via a canvas, most functions for element selection can't be used, but function of the browser object can be used.
- The jasmine API for making assertions.
- SharedBehaviors takes care of behavior commonly required when testing a PsychoJS experiment.
- Custom browser commands takes care of tasks commonly required when testing a PsychoJS experiment.