The contents of the develop
branch will become Storyplayer v3.0 (a.k.a. SPv3).
- Introduce a more self-documenting approach to stories
- Introduce a long-term approach for using Storyplayer modules that's more natural for PHP developers
- More tests for Storyplayer modules (both the 'legacy' approach used before now, and the long-term approach)
- Introduce an internal event-driven approach (we will gradually refactor SPv3 around this)
- Introduce Env.php scripts for test environments
- Improve support for multiple test environments
- Improve the APIs provided by Storyplayer's modules
- Story templates should now extend
Storyplayer\SPv2\Stories\StoryTemplate
. The originalDataSift\Storyplayer\PlayerLib\StoryTemplate
base class is still there, for backwards-compatibility. - New stories should now be created from
Storyplayer\SPv2\Stories\BuildStory
.- These stories will show their filename in output, rather than the old category / group / called triad.
- SPv2 modules are now available to imported via standard PHP
use
statements. - New modules:
- Exceptions - standardise the exceptions that other modules should throw
- Filesystem - operate on the local or remote filesystem
- Screen - run processes inside screen(1) locally or remotely
storyplayer create-story
updated to generate a template based on the long-term approach to modulesruntime.json
files are now formatted for ease of reading- New
Asserts::assertsNull()
actions available - New
StoryplayerInternals
namespace for us to refactor code into - New
Deprecated
internal module - New
Events
internal module - Lots of work tidying up the RuntimeTable internal module
- New
RuntimeTable::expectsRuntimeTable()->exists()
- New
RuntimeTable::expectsRuntimeTable()->doesNotExist()
- New
RuntimeTable::fromRuntimeTables()->getAllTables()
- New
RuntimeTable::fromRuntimeTable()->getTableIfExists()
- New
RuntimeTable::fromRuntimeTable()->getGroupFromTable()
- New
RuntimeTable::fromRuntimeTable()->getIsEmpty()
- New
RuntimeTable::fromRuntimeTable()->hasItem()
- New
RuntimeTable::fromRuntimeTable()->hasGroup()
- New
RuntimeTable::fromRuntimeTables()->getAllTables()
- New
RuntimeTable::fromRuntimeTables()->getTableExists()
- New
RuntimeTable::fromRuntimeTables()->getAllTables()
- New
RuntimeTable::fromRuntimeTables()->getTable()
- New
RuntimeTable::usingRuntimeTable()->removeTable()
- New
RuntimeTable::usingRuntimeTables()->createTable()
- New
RuntimeTable::usingRuntimeTables()->removeTable()
- New
RuntimeTable::usingRuntimeTables()->removeTableIfEmpty()
- New
- New
--log-internal-events
CLI switch - New
--warn-deprecated
CLI switch - Add support for a Ubiquitous Language-driven approach
- New
--ublang
CLI switch to activate the new UbLang console - New
$story->setScenario()
metadata helper - Reduce some of the chatter in the logs
- New
- New
create-test-env
command - Added support for reusable templates for test environments
- Added
Storyplayer\SPv3\TestEnvironments\TestEnvironmentTemplate
- Added
-t / --target
now requires full path to a test environment setup / teardown script
- The browser no longer gets stuck in 'persist' mode when a single story wants the browser to persist for its execution.
- The Host and Shell modules now work on OSX.
- The Host and Shell modules now work on CentOS 5, 6 & 7.
- We now have stack traces in the log file whenever a phase fails.
- We used to only have them for completely uncaught exceptions.
usingRolesTable()->addHostToRole()
no longer triggers an exception when a role already exists in the runtime table.TestEnvironmentRuntimeConfig::removeEmptyTables()
now correctly called.- We now use Composer for autoloading all of Storyplayer's own global functions.
- .storyplayer/runtime.json has been replaced. Each test environment now gets its own
runtime.json
file.
- New
legacy-features
section, for testing SPv2 functionality that is no longer the recommended approach.
list-targets
switch removed
- Workaround for PHP segfault when creating / destroying test environments.
- Workaround for PHP nesting level too deep error.
- Use
127.0.0.1
as the IP address of the host machine, if we cannot determine the host machine's IP address.
storyplayer
now exits with a return code of 1 whenever a detectable error occurs
- SPv2.3.5 broke support for running tests against the Selenium standalone server.
- Fixed
LocalWebDriverAdapter
to always provide a URL for where Selenium is.
- Fixed
- Found a bug where SPv2.3.x would attempt to include a PHP file more than once.
- Fixed
src/bin/storyplayer
to userequire_once()
instead ofrequire()
- Fixed
- Added initial support for Selenium Grid
- Added
device.localwebdriver.url
module setting - Updated the
LocalWebDriverAdapter
to support the new setting
- Added
This is a workaround until I have time to get the RemoteWebDriverAdapter
working (it needs support for working without BrowserMob-Proxy), and support for defining / overriding devices in test environments.
- Stop relying on unpredictable third-party CentOS Vagrant images
- Moved
vagrant-vbox-centos6-ssl
to our own image - Renamed
vagrant-vbox-centos6-ssl
to bevagrant-vbox-centos-6.7
- Moved vagrant-vbox-centos7 to our own image
- Renamed
vagrant-vbox-centos7
to bevagrant-vbox-centos-7.1
- Moved
- Parse CentOS 7 IP addresses using the
ip
commandifconfig
is no longer installed by default on CentOS 7.x
- Drop support for parsing the PHP code we're executing
- Too many
composer
errors when trying to install nikic's parser :(
- Too many
- Drop requirement for Amazon AWS SDK
- Amazon have removed v2.x of their SDK from Packagist
- Missing dependency was preventing Storyplayer installing
We'll update Storyplayer to support v3.x of the SDK in due course.
-
Replace all
grep
andawk
CLI commands with processing done in PHP insteadThis fix solves the problem of the mangling of escaped characters in many of the shell commands that Storyplayer runs.
-
Update virtualbox images used for Storyplayer's own test-suite.
- The CentOS images that we previously used are no longer available :(
- Ubuntu have removed their v14.10 virtualbox image :(
-
Use
make -j 4
for building ZMQ inside virtualbox images, to speed up test runs.
- No longer depends upon dev-master of nikic/php-parser
- Fixed broken dependency on mockery/mockery
The major focus for this release has been building the new way of defining a test environment. This was necessary:
- to make it possible to document how to define a test environment
- to build a facade on top of our last piece of major technical debt (test environment adapters)
The older, JSON-based approach has not been dropped, but will remain undocumented. You are urged to migrate your test environment config files before SPv2.5 is released at the start of July.
- Centos 7.0 is now supported for test environment hosts.
- Ubuntu is now supported for test environment hosts :) Supported releases are:
- Ubuntu 14.04 LTS
- Ubuntu 14.10
- Ubuntu 15.04
- Storyplayer now searches a
storyplayer
folder (without a dot at the front of the name) for your system-under-test and test environment config files- Falls back to searching the
.storyplayer
too.
- Falls back to searching the
- Test environments can now be defined in PHP.
- Only Vagrant / Virtualbox is supported in this release
- Support for all other test environment types will be added in SPv2.4.
- Support for multiple Vagrantfiles (one Vagrantfile per test environment)
- dsbuild files can now live in the same folder as the test environment config file
storyplayer/php
in your project is now automatically added to the PHP autoloader search path if it exists- use it for any local Storyplayer modules you want to publish
storyplayer/php/functions.php
in your project is now autoloaded if it exists- fromHost()->getLocalFolder() - the folder containing the host's supporting files
Fixes:
- Browser module: can now search for labels
- Browser module: fromBrowser()->has() works once more
- Iterators: fix 'exception not found' error
These are SPv1 features that have been upgraded to support SPv2's new features such as test environments.
- SavageD module overhauled to support SPv2 test environments and host IDs
Other changes you need to know about:
browsermob-proxy
is now optional, and switched off by default. You can switch it back on if you add these config settings.
- New methods for expectsBrowser() and expectsForm():
- New
usingBrowser()->click()->firstXXX
et al ordinal prefix for search terms - New
expectsBrowser()->has()->oneXXX
et al ordinal prefix for search terms - fromConfig()->getModuleSetting() is now the preferred way for a module to get any
moduleSettings
config. - fromConfig()->hasModuleSetting() added.
- Host module can now start/stop any screen session in your test environment
- You can now override the default grace period in
usingHost()->stopProcess()
- fromStoryplayer() module
- New ZeroMQ module
- The old ZeroMQ module is now known as the ZMQ module
- you can now throw a
Prose\E4xx_StoryShouldFail
exception in your PreTestPrediction when you predict that the story should fail src/bin/storyplayer
now uses Composer to work out what its version number is
- fromConfig() module is now an internal module. Use the fromStoryplayer() module instead.
- the Graphite module now looks in your test environment config file for its settings. You can have different Graphite servers for different test environments now :)
- usingHost()->delete() no longer takes a
$body
parameter (violated the HTTP protocol standard) - the PreTestPrediction phase works once more
The following are now deprecated, and will be removed in Storyplayer v3.0.
Full details, including migration instructions, are included with each link above.
- Use correct VM name in VagrantVm when checking if the box is running
- Initial support for using Vagrant with something other than Virtualbox
- $story->inGroup() now supports an array, or a string using ' > ' as the delimiter
- fromHttp()->get() now supports optional timeout parameter
- usingHttp()->delete() now supports optional timeout parameter
- usingHttp()->post() now supports optional timeout parameter
- usingHttp()->put() now supports optional timeout parameter
Amazon AWS Module:
- now expects your AWS keys to be in 'moduleSettings.aws' in your
storyplayer.json
file.
Asserts Module:
- assertsDouble() now works (required fix in datasift/stone-1.9.6)
- assertsObject() now works with IteratorAggregate objects
- assertsString() no longer throws fatal errors when fed arrays or objects
- much better log messages from the Asserts module, especially when assertions fail
Users Module:
- usingUsers::saveUsersToFile() now pretty-prints the JSON for easier maintenance
Stories:
- assertsArray() module now covered
- assertsBoolean() module now covered
- assertsDouble() module now covered
- assertsInteger() module now covered
- assertsObject() module now covered
- assertsString() module now covered
The --users switch introduced in 2.0.0 should now work as originally intended.
- no more fatal errors if --users switch not used
- --users switch will create file if it does not exist
- --users switch will accept an empty file
- better warning and error messages around --users problems
- Checkpoint: make sure each story starts with an empty checkpoint
Considered feature-complete / stable.
Highlights (compared to Storyplayer v1) include:
- Much better support for running multiple tests
- Test environment separation
- System under test separation
- New console support for ease of use
- storyplayer.log
- No more $st required in tests (still supported!)
- Output report support
- dot.notation.support for reading the config from inside stories
- Support for stories self-blacklisting themselves
- dsbuild (shell script) provisioner
- Support for multiple machines in test environments
- and more besides