I've been playing around with the behat testing module from [url=https://github.com/silverstripe-labs/silverstripe-behat-extension/]here[/url] with reasonable success. I'm not too bad with SS but a total newbie when it comes to testing - but I'm aware its the "right thing" to do so I'm keen to figure it out!
I've got it generally up and running - test db creates just fine, successfully collects to selenium and runs features that use the 'out of the box' definitions work perfectly.
However, now I want to write my own definitions and I'm really struggling to get behat to recognise my custom featurecontext file. I'm using the behat.yml from the installer (in the root next to framework etc) with these additions:
# Adjust "base_url" to your own website URL.
# Can be set via environment variables or _ss_environment.php/$_FILE_TO_URL_MAPPING as well.
# TODO Dynamically set through LocatorProcessor
But the TestFeatureContext.php which lives in mysite/tests/behat/features/bootstrap/ fails to load and I get:
Context class "TestFeatureContext" not found and can not be instantiated.
The TestFeatureContext file is taken from the example on github - a class that extends SilverStripeContext.
So if you got through the lengthy post I'd appreciate some pointers as to where i'm going wrong!