-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
Home - Installation
The steps below are for any developer that would like to run tests of psychojs and/or create new tests.
- Clone the psychojs_testing repo to your hard drive
- Go to its root folder and run
npm install
This is required for both Karma and WebdriverIO tests.
- Clone and install the PsychoJS repo
- Create an environment variable PSYCHOJS_PATH that points to the directory you cloned PsychoJS into
This is required for compiling test-experiments to PsychoJS, which you'll need if you've developed your own WebdriverIO test:
- Clone and install the PsychoPy repo.
- Create an environment variable PSYCHOPY_PATH that points to the directory you cloned PsychoPy into.
To perform a WebDriverIO (end-to-end) test, you'll need to host the experiments on a web-server. The easiest approach is setting up a local webserver:
- Install a web-server, such as WampServer for Windows (2do: guides for MacOS and Linux)
- Set up an alias from
http://localhost/psychojsto the directorydeployed_experimentsin your clone of the psychojs_testing repo (for example/my_repos/psychojs_testing/deployed_experiments
To perform a WebDriverIO (end-to-end) test, you'll need a Selenium/Appium server. Installation of the psychojs_testing comes with a built-in Selenium Standalone service that includes drivers for Chrome and Firefox. If this doesn't work out-of-the-box, or if you'd like to test on Edge and Safari as well, see Setting up a Selenium or Appium server.
If you're part of the PsychoPy/PsychoJS core team, you can deploy your experiments to a staging server and run tests via BrowserStack. To achieve this, set up the environment variables below.
You'll need the environment variables STAGING_PORT, STAGING_USERNAME, and STAGING_PASSWORD.
- Store your Browserstack username in an environment variable named BROWSERSTACK_USER
- Store your Browserstack Automate access key (found on this page in an environment variable named BROWSERSTACK_ACCESSKEY