Class: PortalTestRunner

PortalTestRunner(groups, variants, test_names)

Run one or more burden tests. This will operate in sequence: all specified tests on all specified masks

The actual call signature of a burden test is pretty low-level. In addition to running the list of tests, this helper also restructures human-friendly mask and variant representations into a shape that works directly with the calculation.

Constructor

new PortalTestRunner(groups, variants, test_names)

Create a test runner object, using group and variant data of the form provided by parsePortalJSON. Generally, this helper is a convenience wrapper based on the raremetal.js API format spec, and hence it expects variant and group definitions to follow that spec.

Parameters:
Name Type Description
groups

PortalGroupHelper

variants

PortalVariantsHelper

test_names Array.<String> | Array.<_AggregationTest>
Source:

Methods

addTest(test) → {_AggregationTest}

Parameters:
Name Type Description
test String | _AggregationTest
Source:
Returns:
Type
_AggregationTest

run()

Run every test on every group in the container and return results

Source:
Returns:

Promise A promise representing the fulfillment state of all tests being run

toJSON(results) → {Promise.<({data: {groups: (Promise.<any>|Array), variants: *}}|never)>}

Generate a JSON representation of the results. Returns a Promise, because some methods may run asynchronously (eg via web workers), or require loading external libraries (eg webassembly)

Parameters:
Name Type Description
results

Array

Source:
Returns:
Type
Promise.<({data: {groups: (Promise.<any>|Array), variants: *}}|never)>