Commit b81abace authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Merge branch 'feature/behat-parameters' into '2.x'

Add a <tags> argument to the <test> command

We can now filter which scenarios are run by behat.

See merge request !4
parents e79b5bdf 36444006
......@@ -6,6 +6,8 @@ This project adheres to[Semantic Versioning].
== [Unreleased]
* Add a "tags" argument to the "test" command in order to limit which scenarios are run by behat.
=== Fixed
* Site name can now have whitespaces without breaking the shell execution string
......@@ -25,16 +25,19 @@ def init():
def test():
def test(tags=''):
Setup Behat and run the complete tests suite. Default output formatters: pretty and JUnit.
The JUnit report file is specified in the Behat configuration file. Default: tests/behat/out/behat.junit.xml.
:param tag Specific Behat tests tags to run.
:param tags Specific Behat tests tags to run.
if not tags:
execute(, tags='{}'.format(tags))
......@@ -51,7 +51,7 @@ def install():
def run():
def run(tags='~@wip&&~@disabled&&~@test'):
Execute the complete Behat tests suite.
:param role Default 'role' where to run the task
......@@ -68,8 +68,5 @@ def run():
if not h.fab_exists(role, '{}/tests/behat/behat.yml'.format(workspace)):
with h.fab_cd(role, '{}/tests/behat'.format(workspace)):
h.fab_run(role, 'behat --format junit --format pretty --tags "~@wip&&~@disabled&&~@test" --colors')
# To run behat with only one test for example, comment previous line
# and uncomment next one
# fab_run(role, 'behat --format pretty --tags "~@wip&&~@disabled&&@yourTest" --colors')
h.fab_run(role, 'behat --format junit --format pretty --tags "{}" --colors'.format(tags))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment