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 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀