6
Currently :term:`Plainbox` has no graphical user interface. To use it you need
6
Currently :term:`PlainBox` has no graphical user interface. To use it you need
7
7
to use the command line.
9
Plainbox has built-in help system so running :command:`plainbox run --help`
9
Basically there is just one command that does everything we can do so far, that
10
is :command:`plainbox run`. It has a number of options that tell it which
11
:term:`job` to run and what to do with results.
13
PlainBox has built-in help system so running :command:`plainbox run --help`
10
14
will give you instant information about all the various arguments and options
11
15
that are available. This document is not intended to replace that.
13
17
Running a specific job
14
18
^^^^^^^^^^^^^^^^^^^^^^
16
Basically there is just one command that does everything we can do so far, that
17
is :command:`plainbox run`. It has a number of options that tell it which
18
:term:`job` to run and what to do with results.
20
20
To run a specific :term:`job` pass it to the ``--include-pattern`` or ``-i``
23
For example, to run one of the internal "smoke" test job:
23
For example, to run the ``cpu/scaling_test`` job:
25
25
.. code-block:: bash
27
$ plainbox run -i 2013.com.canonical.plainbox::stub/true
27
$ plainbox run -i cpu/scaling_test
46
46
.. code-block:: bash
48
plainbox dev special --list-jobs
48
plainbox special --list-jobs
50
50
Running a white list
51
51
^^^^^^^^^^^^^^^^^^^^
53
To run a :term:`whitelist` pass the ``--whitelist`` or ``-w`` option.
53
To run a :term:`white list` pass the ``--whitelist`` or ``-w`` option.
55
55
For example, to run the default white list run:
57
57
.. code-block:: bash
59
$ plainbox run -w /path/to/some/file.whitelist
64
Anything that Plainbox captures and stores during test execution can be
65
exported to a file using the exporter system. The two most commonly used
66
exporters are JSON (versatile and general) and XML (for internal Canonical use).
71
To generate a JSON file with all of the internally available data (for storage,
72
processing or other automation) you will need to pass three additional
73
arguments to ``plainbox run``:
75
#. ``--output-format=2013.com.canonical.plainbox::json``
76
#. ``--output-options=OPTION1,OPTION2`` where *OPTIONx* are option names.
77
#. ``--output-file=NAME`` where *NAME* is a file name.
79
Pass ``?`` to ``--output-options`` for a list of available options. Multiple
80
exporter options can be specified, separated with commas.
84
$ plainbox run --whitelist=/path/to/some/file.whitelist --output-format=2013.com.canonical.plainbox::json --output-file=results.json
59
$ plainbox run -w /usr/share/checkbox/data/whitelists/default.whitelist
61
Saving test results as XML
62
^^^^^^^^^^^^^^^^^^^^^^^^^^
89
64
To generate an XML file that can be sent to the :term:`certification website`
90
you need to pass two additional arguments to ``plainbox run``:
65
you need to pass two additional options:
92
#. ``--output-format=2013.com.canonical.plainbox::hexr``
93
#. ``--output-file=NAME`` where *NAME* is a file name
67
1. ``--output-format=xml``
68
2. ``--output-file=NAME`` where *NAME* is a file name
95
70
For example, to get the default certification tests ready to be submitted
98
73
.. code-block:: bash
100
$ plainbox run --whitelist=/path/to/some/file.whitelist --output-format=2013.com.canonical.plainbox::hexr --output-file=submission.xml
105
You can discover the full list of known exporters at runtime, by passing ``?``
106
to ``--output-format``.
111
Exporters can be provided by third party packages. Exporters are very simple to
112
write. If you don't want to transform JSON to your preferred format, you can
113
copy the json exporter and use it as template for writing your own.
75
$ plainbox run --whitelist=/usr/share/checkbox/data/whitelists/default.whitelist --output-format=xml --output-file=submission.xml
77
Running stable release update tests
78
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
PlainBox has special support for running stable release updates tests in an
81
automated manner. This runs all the jobs from the *sru.whitelist* and sends the
82
results to the certification website.
84
To run SRU tests you will need to know the so-called :term:`Secure ID` of the
85
device you are testing. Once you know that all you need to do is run:
89
$ plainbox sru $secure_id submission.xml
91
The second argument, submission.xml, is a name of the fallback file that is
92
only created when sending the data to the certification website fails to work