Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataPipe testbed

Test experiments for DataPipe, for checking a deployment end to end. Published at https://jspsych.github.io/datapipe-testbed/.

  • jsPsych page (site/jspsych/) — jsPsych 8 with @jspsych/extension-pipe. Registering the extension is the whole integration: no save trial, no await, no session variable. Trials are staged as they happen and abandoned sessions are recovered. Written exactly the way the extension's docs tell researchers to write it, so it also checks that the documented pattern works.
  • Plain JavaScript page (site/vanilla/) — no jsPsych and no framework, using datapipe-client for staging and condition assignment, and a bare fetch for the submission (optionally gzipped). Streaming without jsPsych is new: while the staging client lived inside the jsPsych plugin there was no way to reach it from a page like this.

Both pages log every request and response on screen, so a run can be checked without DevTools — including on a phone, where flaky connections are easiest to reproduce.

Using it

  1. Create an experiment on the deployment you are testing — for the test deployment, sign in at https://datapipe-test.web.app — and switch data collection on.
  2. Open the testbed home page, enter the experiment ID, pick the options, and open a test.
  3. Keep the experiment's dashboard open alongside. The home page lists the scenarios to check and what each should look like.

Every setting is a URL parameter, so a test is a link you can share:

Parameter Pages Default Meaning
experiment both DataPipe experiment ID (required)
base both https://datapipe-test.web.app DataPipe deployment
trials both 20 Number of trials (1–500)
format both csv csv or json
auto both 0 1 advances trials automatically
stream jsPsych 1 Incremental upload on/off
breaksave jsPsych 0 1 makes the final submission fail on purpose
session plain JS 0 Call /api/session before starting
condition plain JS 0 Call /api/condition before starting
compress plain JS 1 Gzip the submission

Nothing here is secret: DataPipe experiment IDs are public by design, and none is committed — they come from the URL. Do point tests at a test experiment: they send real data to real storage.

Versions

Everything loads from the CDN at a pinned version: jsPsych, the trial plugin, @jspsych/extension-pipe (which bundles datapipe-client and Firebase, hence its size), and datapipe-client on the plain JavaScript page. Pinning is what makes a test result say which release it checked. To test a new release, bump the version in site/jspsych/index.html or site/vanilla/index.html, and in the note at the bottom of site/index.html that names the versions under test.

Deploying

Pushing to main publishes site/ to GitHub Pages (.github/workflows/pages.yml). There is no build step.

About

Test experiments (jsPsych + plugin-pipe, and plain JavaScript) for checking a DataPipe deployment end to end

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages