如何在Laravel的Docker容器中运行和安装Protractor E2E测试?

时间:2016-07-11 14:15:27

标签: php angularjs laravel docker protractor

我在dockervel开发了 LAravel AngularJS应用程序。 我必须在Protractor中使用e2e测试测试AngularJS,然后我必须提供包括e2e测试在内的应用程序。

在这个dockervel我有

包含的容器

Nginx 1.8.0 & PHP 5.6 running in Alpine
MariaDB 5.5 running in Alpine
Redis running in Alpine
Composer PHP running in Alpine.
Artisan running in Debian (alpine is missing some PHP packages)
NodeJS with gulp, grunt and bower -g installed in official node:4.2.2-slim base image
Volumes mounted as containers

dockervel中的别名:

alias dbuild='docker-compose build'
alias dup='docker-compose up -d'
alias dstop='docker-compose stop'
alias drun='docker-compose run -d --service-ports nginx'
alias dcomposer='docker-compose run composer'
alias dcomposer-create='docker-compose run composer create-project laravel/laravel /var/www --prefer-dist'
alias dpermit='chmod -R 777 www'
alias dartisan='docker-compose run artisan'
alias dnodejs='docker-compose run nodejs'
alias dgulp='docker-compose run nodejs gulp'
alias dgulp-watch='docker-compose run -d nodejs gulp watch'
alias dps='docker ps'
alias dpsa='docker ps -a'
alias dstats='docker stats $(docker ps -q)'
alias dkill='docker stop $(docker ps -q)'
alias drm='docker rm $(docker ps -a -q)'
alias dunit='docker-compose run  php php /var/www/html/vendor/bin/phpunit'

有什么方法可以安装和设置PRotractor在他的环境中运行吗?

1 个答案:

答案 0 :(得分:0)

是的,如果你想在浏览器打开的情况下运行你的脚本,它是无头的。您只需忽略protractor.sh文件并直接在控制台中提供protractor conf.js命令。 它会像往常一样启动你的浏览器!