Skip to content

Mix Survey and Experiment

This journey is for readers who already know one of Testable’s two worlds and want both in one project: a questionnaire between task blocks, a scored quiz after a learning phase, or an experiment bracketed by intake and debrief questions. It assumes you have done, or at least skimmed, one of the two build journeys, Build an Experiment or Build a Survey. It ends with you able to interleave the two worlds in a single trial file and predict exactly how the seams behave.

  1. Trial Types. Reread this with the fork in mind: four type values make experiment trials, form makes a survey row, and the choice is per row, not per project. This is the whole mechanism that makes mixing possible.

Take the steps for the world you have not built in yet, and skip the rest.

  1. Forms and Surveys (for experiment-builders). The anatomy of a form row (head, body, responseType), how consecutive form rows gather onto pages, and how pageBreak splits them. Skip if you came from the survey journey.

  2. Survey Response Types (for experiment-builders). The question widgets (radio, likert, checkboxes, slider, and the rest) and their answer options. Skim the table now and return per question type as you need it. Skip if you came from the survey journey.

  3. Responses in Experiments (for survey-builders). How experiment trials collect responses (buttons, key, and responseType on test rows) and how key scores them for accuracy. Skip if you came from the experiment journey.

  1. Mixing Surveys and Experiments. The centre of this journey; read all of it. It covers how form rows group into pages between trials, showing stimuli next to questions, scoring form answers with key, which columns cross over between the worlds and which stay experiment-only, and it closes with a worked example file.

The workflow layer does not care which world a row belongs to, so a mixed project randomises, branches, and screens as a single unit.

  1. Randomisation. random and randomBlock shuffle form rows and experiment trials alike, and sampling specs in the trialOrder cell select among them. On experiment trials, stimOptions and stimOrder additionally randomise the stimulus order within a trial.

  2. How to Inject Logic. The if and then columns branch on responses from either world; this is how a survey answer routes a participant past or into an experimental block.

  3. Screener Surveys. form questions at the top of the file plus then = screenout remove ineligible participants before the main task. Skip if you qualify participants elsewhere.

  1. Previewing Your Trials. The previewer renders instructions, experiment trials, and form pages alike, and conditional logic works in it, so you can test your branching and screenout rules before publishing.

  2. How to Read the Results Files. Form pages write their own rows alongside the rows from your test trials; this page shows where each answer lands. The wide download in Results Formats is particularly handy for the survey side, since all answers to the same question end up in one column.

You are ready when you can look at the worked example at the end of Mixing Surveys and Experiments and predict, row by row, what participants see, which rows are scored, and how the form rows group into pages. Then build your own mixed file: start from your existing experiment or survey project, drop rows from the other world into the trial file, and preview the seams.