Skip to content
Martin Nordsletten edited this page Dec 3, 2018 · 5 revisions

As a minimum a test must have the following:

  • Separate folder with a unique name
  • testspec.json file
  • A test script

Test spec

Contains the specifications for a specific test. Can have the following fields:

Field name Required Description
clientcommandscript / hostcommandscript YES Script to run
naclfile NO NaCl file to run
setup NO Setup script to run on individual clients before test run
cleanup NO Cleanup script to run when test is finished
customservicepath NO Path to a custom service that should be built, pushed and deployed
shouldfail NO Flag indicating if the test is expected to fail or not (default: false)
nodeploy NO Do not perform a deployment (default: false)

ClientCommandScript vs. HostCommandScript

There are two options for running a script:

ClientCommandScript: is run on client1.

HostCommandScript: is run on the host that initiates the lotto test. This type of script has the option to issue Mothership commands. The script can contain templates for useful information. Supported template options are:

Template name Description
MothershipBinPathAndName Used to substitute the mothership binary path
OriginalAlias The original alias that the starbase should have
ImageID ID of image built from a custom service in the same test
BuilderID ID of the builder that was supplied as a parameter to lotto

Example testspec.json

The following is an example configuration:

{
  "clientcommandscript": "hey-http-test.sh",
  "naclfile": "dnat-snat.nacl",
  "setup": {
      "client1": "install_hey.sh",
      "client3": "apache_server_setup.sh"
    },
  "cleanup": {
    "client3": "apache_server_cleanup.sh"
  }
}
Clone this wiki locally