duan1933 2013-07-25 19:50
浏览 59
已采纳

Jenkins和Behat简介

Hi i got some problem with my behat and jenkins configuration.

I would like run Behat test in a jenkins build with this configuration :

/behat.yml

default:
    extensions:
        Behat\MinkExtension\Extension:
            base_url: 'http://symfony.localvm/app_dev.php'
            browser_name: 'firefox'
            javascript_session: 'selenium2'
            goutte: ~
            zombie: ~
            selenium2: ~

jenkins:
    formatter:
        name: progress,junit,html
        parameters:
            output_path: ,app/build/behat,app/build/behat.html
    extensions:
        Behat\MinkExtension\Extension:
            base_url: 'http://symfony.localvm/app_dev.php'
            javascript_session: selenium2

And in my build.xml

    <target name="behat" description="Run behat test">
        <exec executable="../bin/behat" failonerror="false" inputstring=""></exec>
    </target>

(My composer)

    "require-dev": {
        "behat/behat": "2.4.*@stable",
        "behat/mink-extension": "@dev",
        "behat/mink-goutte-driver": "@dev",
        "fabpot/goutte": "@dev",
        "behat/mink-sahi-driver": "@dev",
        "behat/mink-zombie-driver": "@dev",
        "behat/mink-selenium2-driver": "@dev"
    },

But Jenkins doesn't use the jenkins profile in behat.yml, how I tell to Jenkins : "Hey Jenkins, user the jenkins profile please!" in the configuratio ? Or Jenkins must do it alone?

If I push the formatter parameter in the default profile and use the command line the .xml files are well generated.

Thx for help

  • 写回答

1条回答 默认 最新

  • doulai2573 2013-07-25 20:16
    关注

    i think You should add profile parameter in your build.xml, it's looks like

    behat  --profile ios
    

    behat documentation

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题