[openstack-dev] [openstack-sdk-php] Reasons to use Behat/behavior driven development in an SDK?
Choi, Sam
sam.choi at hp.com
Fri Jun 6 10:20:50 UTC 2014
Hello all,
During our most recent php sdk team meeting, a suggestion to use the PHP framework Behat (http://behat.org/) was brought up. I'd like to begin a discussion around the pros/cons of using Behat to create tests. For those not familiar with the php sdk or Behat, we are currently using PHPUnit for all of our tests and are considering Behat for writing human-readable stories that can potentially generate tests that can be run against the sdk.
A couple general questions for all devs
- Is a similar framework being used for any OpenStack CLI/SDK project? I'd love to see an example.
- What kind of pros/cons have you all seen when using Behat or similar frameworks for testing?
Jamie
- Would the suggested Behat framework be intended to supplement our existing PHPUnit tests? In effect, giving us a set of Behat tests and PHPUnit tests. Or was the suggestion to have all tests rely on the Behat framework?
After reviewing Behat and some related technologies, I do have a few concerns at the moment. Any thoughts of the concerns would be appreciated.
- We are introducing another dependency for the PHP SDK. What happens if there is a reason for us to switch to another BDD framework or ditch it to go back to PHPUnit? It seems like we would likely be faced with significant test refactoring.
- Contributors will have to be proficient with Behat/BDD in order to write tests for the PHP SDK. This adds to what may already be a steep learning curve for a new contributor who has to learn our code base, Guzzle for the transport layer, how to use various/develop various cloud services etc.
- For more complicated tests, writing out features, scenarios, step definitions, and testing logic would almost certainly take longer than writing a traditional test in pure PHP.
Thanks,
--
Sam Choi
Hewlett-Packard Co.
HP Cloud Services
+1 650 316 1652 / Office
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140606/851223da/attachment.html>
More information about the OpenStack-dev
mailing list