-
Notifications
You must be signed in to change notification settings - Fork 0
Experiment Definition
Jun Zheng edited this page Jul 20, 2019
·
2 revisions
In carbon, experiments are defined using XML files.
All XML files must start with a root element called Experiment
. It can have two attributes:
-
name
- Name of the experiment. -
uuid
- Experiment UUID, used to uniquely identify the experiment on the back-end.
Within the Experiment
node, you need a Canvas
node, it can have two attributes:
-
width
- Width in pixels. -
height
- Height in pixels.
If you do not specify width or height, they will by default be 100% filling the entire screen.
Within the Canvas
node, you can have a mix of Section
and Widget
nodes. Section
is analogue to div
element in HTML, Widget
defines a widget you wish to use.
Following is an example experiment definition:
<?xml version="1.0"?>
<Experiment
name="My Cool Experiment"
uuid="11d55937-d06f-4dd8-96d1-49d0dd9126cf"
>
<Widgets>
<Import name="text-box" uuid="d13985a7-dbad-4c2d-9330-e1dcb1324f71" />
<Import name="button" uuid="6ad19ca3-8da0-4cf2-8721-7e11eb7452ae" />
</Widgets>
<Canvas>
<Section>
<Section>
<Widget
name="button"
id="submit-button"
/>
</Section>
<Section>
<Widget
name="text-box"
id="name-text-box"
/>
</Section>
</Section>
</Canvas>
</Experiment>