기본 웹 드라이버로 Firefox를 사용하고 Phantomjs를 대체 환경으로 사용하는 듀얼 Selenium 환경 설정이 있습니다. 테스트를 할 때, 나는 firefox 드라이버를 사용하고 브라우저를 돌파하는 것을 지켜 봅니다. 하지만 CI 서버의 경우 실제로 브라우저 창을 열지 않는 phantomjs를 사용합니다. 실제로 시간을 정하지 않았지만 아마도 약 50 % 빨라졌습니다.
나는 항상 상관없이 내가 실행하고 싶은 테스트, 다음과 셀레늄 서버를 시작하지 :
class_name: CodeTester
modules:
enabled:
- WebDriver:
- Db:
cleanup: false
config:
WebDriver:
url: 'http://my.example.com'
browser: firefox
clear_cookies: true
window_size: 1024x768
capabilities:
unexpectedAlertBehaviour: 'accept'
env:
phantom:
modules:
config:
WebDriver:
browser: phantomjs
clear_cookies: true
window_size: 1024x768
capabilities:
unexpectedAlertBehaviour: 'accept'
phantomjs.cli.args: [ '--ignore-ssl-errors=true' ]
기본을 호출하려면 :
java -jar selenium-server-standalone-2.53.0.jar -Dphantomjs.binary.path=../bin/phantomjs
code.suite.yml에는 다음이 포함되어 파이어 폭스, 난 그냥 다음 (공급 더 ENV) 실행되지 :
php codecept.phar run gui --steps
을하지만 판을 지정합니다 tomjs ENV, 나는 다음을 실행합니다 : 너무 오래, 하나의 시스템에서 테스트 평행을 실행하거나 여러 시스템에서 테스트 병렬로 실행하는 셀레늄 허브를 사용하려고
php codecept.phar run code --steps --env phantom
출처
2016-08-29 23:35:47
MLB
그리고 20 분이 너무 길다고 생각하십니까? 왜? 당신의 기대는 무엇입니까?이 테스트는 무엇을하고 있습니까? –