2013-11-27 1 views
0

시나리오 :하나의 HTML 파일에 결과 behat 추가하는 방법

1) 나는 실행 PHP 빈/기능/1.feature> result.html 2)는 PHP 빈을 실행/기능 behat/2. 기능 behat > result.html 3) results.tml에서 1.feature 및 2.feature의 결과를 모두 확인해야합니다.

어떻게해야합니까? behat에는 추가 옵션이 있습니까?

어쩌면 php bin/behatences/1.feature --append> results.html?

답변

0

behat.yml에서 프로필을 사용하고 프로필별로 실행할 기능을 지정할 수 있습니다. 대신 behats를 여러 번 실행하는 대신 각 .feature에 대해 한 번 실행하면 한 번 실행하고 여러 HTML 파일 대신 하나의 HTML 파일을 가져옵니다.

예 : 다음 구성에는 로그인 시나리오 용과 예약 시나리오 용 두 개의 프로필이 있습니다. @wip 태그가 붙은 시나리오도 걸러냅니다. 이 명령 줄 ('매우')에 데이터를 출력하고, HTML 파일 ('HTML')에 :

behat --profile login 

하는 실행됩니다 :

#behat.yml 

default: 
    filters: 
     tags: "[email protected]" 

    formatter: 
     name: pretty,html 
     parameters: 
      output_path: null,behat_report.html 

login: 
    paths: 
     features: features/login 
     bootstrap: %behat.paths.features%/bootstrap 

booking: 
    paths: 
     features: features/booking 
     bootstrap: %behat.paths.features%/bootstrap 

그런 다음 원하는 프로필을 실행할 수 있습니다 features/login/디렉토리 내의 모든 .feature 파일