forked from KnpLabs/KnpBundles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrading behat to 2.4 and additional required changes
remove initialization of mink and behat bundles add project directory level behat.yml initial spec remove behat mink configuration from symfony config files remove old composer.lock and update vendors add composer lock file for upgrade fix travis call for behat script and make behat-ci script executable move behat-ci.sh inside bin directory fix behat-ci script adapt Behat Contexts to running state add mink selenium driver enable minkcontext steps ignore behat.yml and make dist version of configuration embed behat deps on require-dev shorten namespaces remove nulls from declaration of kernel vars remove useless if remove sellenium, sahi
- Loading branch information
Showing
11 changed files
with
187 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,6 @@ composer.phar | |
bin/* | ||
!bin/launch-rabit-consumers.sh | ||
!bin/prepare-*.sh | ||
|
||
!bin/behat-*.sh | ||
build | ||
behat.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,3 @@ framework: | |
web_profiler: | ||
toolbar: false | ||
intercept_redirects: false | ||
|
||
mink: | ||
show_cmd: firefox %s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
default: | ||
formatter: | ||
name: progress | ||
extensions: | ||
Behat\Symfony2Extension\Extension: | ||
mink_driver: true | ||
kernel: | ||
env: test | ||
debug: true | ||
Behat\MinkExtension\Extension: | ||
base_url: 'http://knpbundles.local/app_test.php/' | ||
default_session: symfony2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
# ./bin/behat-ci.sh | ||
|
||
project_dir=$(dirname $(readlink -f $0))"/.." | ||
logs_path=${1:-"./build/logs/behat"} | ||
reports_path=${2:-"./build/behat"} | ||
|
||
check_and_create_dir() { | ||
path=$1 | ||
echo $path | ||
if [[ -d "$path" ]]; then | ||
# Directory already exists, do nothing | ||
: echo "Directory already exists" | ||
elif [[ -e "$path" ]]; then | ||
echo "$path exists and is not a directory"; | ||
else | ||
mkdir -p $path | ||
fi | ||
} | ||
|
||
check_and_create_dir $reports_path | ||
check_and_create_dir $logs_path | ||
|
||
cd $project_dir | ||
|
||
logs_path=${logs_path##$(pwd)/} | ||
reports_path=${reports_path##$(pwd)/} | ||
|
||
for feature_path in `find src/ -path '*/Features'`; do | ||
var=`echo $feature_path`; | ||
var2=${var%Bundle*}; | ||
bundle=`echo "${var2##*/}Bundle"` | ||
reports_dir=$reports_path"/$bundle.html" | ||
|
||
echo "Running suite for $bundle"; | ||
|
||
./bin/behat --format=progress,junit,html --out=,$logs_path,$reports_dir "@$bundle"; | ||
echo "<a href=\"$bundle.html\">$bundle</a><br />" >> $reports_path"/index.html" | ||
done | ||
|
||
cd - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.