Property | Type | Description | |
---|---|---|---|
$actionsCallbacks | array | this is an array of callbacks. Each callback is a single set of actions to execute the story. Each callback is an alternative way to execute the story. Each callback is meant to be equivalent; ie they achieve the same thing, just in different ways. If any of the callbacks has different outcomes, then they belong in separate user stories. NO EXCEPTIONS. This is a fundamental assumption of Storyplayer; ignore it, and Storyplayer's no use to you! | |
$category | string | the category that this story belongs to | |
$compatibleVersion | integer | you HAVE to set this in your story, otherwise we will skip your story | |
$deviceSetupCallback | array | the function that provides any story-specific setup work that happens when we start a device | |
$deviceTeardownCallback | array | the function that provides any story-specific teardown work that happens just before we stop a device | |
$group | array |
the group that this story belongs to | |
$hintsCallback | callable | the function that provides hints about how this story changes the state of the system or user | |
$name | string | the name of this story | |
$params | array | the parameters that get passed into virtual machines et al, and which can be overridden on the command-line | |
$parserTrees | array | the raw parser tree of this story, and of any templates that we use | |
$perPhaseSetupCallback | array | the function that provides any story-specific setup work that happens before each phase of the test | |
$perPhaseTeardownCallback | array | the function that provides any story-specific teardown work that happens at the end of each phase of the test | |
$persistDevice | boolean | does the story want the test device kept open between phases? | |
$postTestInspectionCallback | array | the callback used to see if the action *did* change the state of the system under test | |
$preTestInspectionCallback | array | the callback used to remember the state of the system *before* the action occurs | |
$preTestPredictionCallback | array | the callback that dynamically determines in advance whether the story actions should succeed or fail | |
$reportTestResultsCallback | array | the callback that dynamically determines afterwards whether or not the story actions actually did succeed | |
$requiredTestEnvRoles | array | a list of the roles that the test environment must have defined, otherwise we cannot run | |
$roleChangesCallback | array | the function that provides information about how this story has changed the state of the system or user | |
$storyFilename | string | the file that contains the story | |
$storyResult | what happened to this story? | ||
$storyTemplates | array | a list of the StoryTemplates that this story is based on. can be empty | |
$testCanRunCheckCallback | array | the function that checks to see if the test should run at all, or should be skipped | |
$testSetupCallback | array | the function that provides any story-specific setup work | |
$testTeardownCallback | array | the function that provides any story-specific teardown action | |
$whitelistedEnvironments | by default, a story is allowed to run on all environments, *but* if an environment's config sets 'mustBeWhitelisted' to TRUE, then the story is only allowed to run on that environment if the story declares itself safe to run we believe that this is the safest approach to handling those stories that simply aren't safe to run absolutely everywhere |
Method | Description | |
---|---|---|
__toString ( ) : string | return a string representation of the story, for things like logging | |
addAction ( $newCallback ) : void | ||
addActions ( $newCallback ) : void | ||
addDeviceSetup ( $newCallback ) : void | ||
addDeviceTeardown ( $newCallback ) : void | ||
addHints ( $newCallback ) : void | ||
addPerPhaseSetup ( $newCallback ) : void | ||
addPerPhaseTeardown ( $newCallback ) : void | ||
addPostTestInspection ( $newCallback ) : void | ||
addPreTestInspection ( $newCallback ) : void | ||
addPreTestPrediction ( $newCallback ) : void | ||
addTestCanRunCheck ( $newCallback ) : void | ||
addTestEnvironmentSetup ( $newCallback ) | ||
addTestEnvironmentTeardown ( $newCallback ) | ||
addTestSetup ( $newCallback ) | ||
addTestTeardown ( $newCallback ) : void | ||
addValidRole ( $role ) | -------------------------------------------------------------------- | |
andOn ( $envName ) : |
||
andValidRole ( $role ) | Synonym for addValidRole() | |
basedOn ( |
set up any templated methods from a predefined class | |
called ( $userStoryText ) : |
||
determineStoryFilename ( ) : void | ||
generateGroup ( ) : |
Set the group name as the file system path of the directory where the test is located | |
generateName ( ) : |
Set the name as the filename of the test | |
getCategory ( ) : string | Get the category that this story belongs to | |
getDeviceSetup ( ) : array | get the callback for device setup work | |
getDeviceTeardown ( ) : array | get the callback for device teardown work | |
getGroup ( ) : array |
Get the group that this story belongs to | |
getGroupAsString ( ) : string | return the story's group as a printable string | |
getHints ( ) : callable | get the hints callback | |
getName ( ) : string | Get the name of this story | |
getOneAction ( ) : callable | pick one action at random, and return it to the caller | |
getParams ( ) : array | ||
getPerPhaseSetup ( ) : array | get the callback for per-phase setup work | |
getPerPhaseTeardown ( ) : array | get the callback for per-phase teardown work | |
getPersistDevice ( ) : boolean | does this story want to keep the web browser open between phases? | |
getPostTestInspection ( ) : array | get the callback to use to work out the test results | |
getPreTestInspection ( ) : array | get the callback to use to perform the preflight checkpoint | |
getPreTestPrediction ( ) : array | get the callback to use to perform the preflight checks | |
getRequiredStoryplayerVersion ( ) : integer | ||
getRequiredTestEnvironmentRoles ( ) : array | ||
getResult ( ) : |
||
getRoleChanges ( ) | get the role changes callback | |
getStoryFilename ( ) : string | ||
getStoryTemplates ( ) : array |
get a list of the templates that this story is based on, in order or precedence | |
getTestCanRunCheck ( ) : array | get the callback which allows the story to be skipped | |
getTestSetup ( ) : array | get the callback for per-story setup work | |
getTestTeardown ( ) : array | get the callback for post-story teardown work | |
getWhitelistedEnvironments ( ) : array | ||
hasActions ( ) : boolean | does this story have any actions? | |
hasDeviceSetup ( ) : boolean | do we have a device setup callback? | |
hasDeviceTeardown ( ) : boolean | do we have a device teardown callback? | |
hasHints ( ) : boolean | have any hints been set? | |
hasPerPhaseSetup ( ) : boolean | do we have a per-phase setup callback? | |
hasPerPhaseTeardown ( ) : boolean | do we have a per-phase teardown callback? | |
hasPostTestInspection ( ) : boolean | ||
hasPreTestInspection ( ) : boolean | do we have a callback | |
hasPreTestPrediction ( ) : boolean | do we have a callback | |
hasRole ( $roleName ) | ||
hasRoleChanges ( ) | has the role changes callback been set? | |
hasTestCanRunCheck ( ) : boolean | do we have a 'check story can run' callback? | |
hasTestSetup ( ) : boolean | do we have a pre-story setup callback? | |
hasTestTeardown ( ) : boolean | do we have a post-story teardown callback? | |
inGroup ( array | string $groupName ) : |
which group of tests does this story belong to? | |
requiresStoryplayerVersion ( $version ) : |
||
requiresTestEnvironmentWithRoles ( $roles ) : void | ||
runsOn ( $envName ) : |
||
setCategory ( string $newCategory ) : |
Set the category that this story belongs to | |
setDefaultCallbacks ( ) : void | ||
setGroup ( array |
Set the group that this story belongs to | |
setHints ( $newCallback ) : void | ||
setName ( string $newName ) : |
Set the name of this story | |
setParams ( array $defaults ) | Set the parameters for this story | |
setPersistDevice ( ) | tell Storyplayer to keep the web browser open between test phases | |
setRoleChanges ( $newCallback ) | ||
setTestEnvironmentSetup ( $newCallback ) | -------------------------------------------------------------------- | |
setTestEnvironmentTeardown ( $newCallback ) |
public __toString ( ) : string | ||
return | string |
public addPostTestInspection ( $newCallback ) : void | ||
return | void |
public addPreTestInspection ( $newCallback ) : void | ||
return | void |
public addPreTestPrediction ( $newCallback ) : void | ||
return | void |
public addValidRole ( $role ) |
public basedOn ( |
||
$tmpl | ||
return |
public generateGroup ( ) : |
||
return | $this for fluent interface |
public generateName ( ) : |
||
return | $this for fluent interface |
public getCategory ( ) : string | ||
return | string | the category that this story belongs to |
public getDeviceSetup ( ) : array | ||
return | array |
public getDeviceTeardown ( ) : array | ||
return | array |
public getGroup ( ) : array |
||
return | array |
public getGroupAsString ( ) : string | ||
return | string |
public getOneAction ( ) : callable | ||
return | callable |
public getPerPhaseSetup ( ) : array | ||
return | array |
public getPerPhaseTeardown ( ) : array | ||
return | array |
public getPersistDevice ( ) : boolean | ||
return | boolean |
public getPostTestInspection ( ) : array | ||
return | array |
public getPreTestInspection ( ) : array | ||
return | array |
public getPreTestPrediction ( ) : array | ||
return | array |
public getRequiredStoryplayerVersion ( ) : integer | ||
return | integer |
public getRequiredTestEnvironmentRoles ( ) : array | ||
return | array |
public getTestCanRunCheck ( ) : array | ||
return | array |
public getTestSetup ( ) : array | ||
return | array |
public getTestTeardown ( ) : array | ||
return | array |
public getWhitelistedEnvironments ( ) : array | ||
return | array |
public hasActions ( ) : boolean | ||
return | boolean | true if this story has any actions |
public hasDeviceSetup ( ) : boolean | ||
return | boolean | true if there is a device setup callback |
public hasDeviceTeardown ( ) : boolean | ||
return | boolean | true if there is a device teardown callback |
public hasPerPhaseSetup ( ) : boolean | ||
return | boolean | true if there is a per-phase setup callback |
public hasPerPhaseTeardown ( ) : boolean | ||
return | boolean | true if there is a per-phase teardown callback |
public hasPreTestInspection ( ) : boolean | ||
return | boolean | [description] |
public hasPreTestPrediction ( ) : boolean | ||
return | boolean | [description] |
public hasTestCanRunCheck ( ) : boolean | ||
return | boolean | true if the callback exists |
public hasTestSetup ( ) : boolean | ||
return | boolean | true if there is a pre-story setup callback |
public hasTestTeardown ( ) : boolean | ||
return | boolean | true if there is a post-story teardown callback |
public requiresStoryplayerVersion ( $version ) : |
||
return |
public requiresTestEnvironmentWithRoles ( $roles ) : void | ||
return | void |
public setCategory ( string $newCategory ) : |
||
$newCategory | string | the category that this story belongs to |
return | $this |
public setGroup ( array |
||
$newGroup | array |
|
return | $this |
public setPersistDevice ( ) |
public setTestEnvironmentSetup ( $newCallback ) |
protected array $actionsCallbacks | ||
return | array |
protected string $category | ||
return | string |
protected int $compatibleVersion | ||
return | integer |
protected array $deviceSetupCallback | ||
return | array |
protected array $deviceTeardownCallback | ||
return | array |
protected callable $hintsCallback | ||
return | callable |
protected array $params | ||
return | array |
protected array $parserTrees | ||
return | array |
protected array $perPhaseSetupCallback | ||
return | array |
protected array $perPhaseTeardownCallback | ||
return | array |
protected bool $persistDevice | ||
return | boolean |
protected array $postTestInspectionCallback | ||
return | array |
protected array $preTestInspectionCallback | ||
return | array |
protected array $preTestPredictionCallback | ||
return | array |
protected array $reportTestResultsCallback | ||
return | array |
protected array $requiredTestEnvRoles | ||
return | array |
protected array $roleChangesCallback | ||
return | array |
protected string $storyFilename | ||
return | string |
protected Story_Result,DataSift\Storyplayer\PlayerLib $storyResult | ||
return |
protected array $storyTemplates | ||
return | array |
protected array $testCanRunCheckCallback | ||
return | array |
protected array $testSetupCallback | ||
return | array |
protected array $testTeardownCallback | ||
return | array |
protected $whitelistedEnvironments |