需要分步指南在Ubuntu上以Jenkins(带有Hudson版本)执行Jmeter脚本 [英] Need Step by Step Guide to execute the Jmeter Scripts in Jenkins (with Hudson build) over Ubuntu

查看:129
本文介绍了需要分步指南在Ubuntu上以Jenkins(带有Hudson版本)执行Jmeter脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是詹金斯(Hudson Build)的新手.我不知道如何将Jmeter脚本与通过Ubuntu安装的jenkins集成.我做了很多研究,但是对于jenkins只能找到基于GUI的步骤.谁能在命令行步骤中帮助我将Jmeter与jenkins集成在一起吗? 我需要将Jmeter集成为一项单独的任务. 我通过Putty和Winscp使用EC2实例.

I am new to jenkins (Hudson Build) . I don't have any Idea how to integrate the Jmeter script with jenkins installed over Ubuntu . I reseached a lot , but could find only the GUI based steps for jenkins . Can any one please help me with Command line steps to integrate Jmeter with jenkins. I need to integrate the Jmeter as a sepearte task . I am usind EC2 instance through Putty and Winscp .

谢谢.

推荐答案

JMeter至少有3个关于非GUI执行方式的选项,Jenkins支持所有这些选项:

JMeter has at least 3 options on how non-GUI execution, all of them are supported by Jenkins:

  1. JMeter Ant Task
  2. JMeter Maven插件
  3. 命令行非GUI启动选项
  1. JMeter Ant Task
  2. JMeter Maven Plugin
  3. Command line non-GUI launch option

随意选择最适合自己的一种.

Feel free to choose the one, you're most comfortable with.

最后一个捆绑在一起,不需要任何第三方软件或额外配置.

The last one is bundled and doesn't require any 3rd party software or extra configuration.

只需按以下步骤执行JMeter:

Just execute JMeter as follows:

./jmeter.sh -n -t ${path to your .jmx script} -l ${path to your results file}

以防万一-完整的命令行选项:

Just in case - full command line options:

    -h, --help
            print usage information and exit
    -v, --version
            print the version information and exit
    -p, --propfile <argument>
            the jmeter property file to use
    -q, --addprop <argument>
            additional JMeter property file(s)
    -t, --testfile <argument>
            the jmeter test(.jmx) file to run
    -l, --logfile <argument>
            the file to log samples to
    -j, --jmeterlogfile <argument>
            jmeter run log file (jmeter.log)
    -n, --nongui
            run JMeter in nongui mode
    -s, --server
            run the JMeter server
    -H, --proxyHost <argument>
            Set a proxy server for JMeter to use
    -P, --proxyPort <argument>
            Set proxy server port for JMeter to use
    -N, --nonProxyHosts <argument>
            Set nonproxy host list (e.g. *.apache.org|localhost)
    -u, --username <argument>
            Set username for proxy server that JMeter is to use
    -a, --password <argument>
            Set password for proxy server that JMeter is to use
    -J, --jmeterproperty <argument>=<value>
            Define additional JMeter properties
    -G, --globalproperty <argument>=<value>
            Define Global properties (sent to servers)
            e.g. -Gport=123                                                                                                                                             
             or -Gglobal.properties                                                                                                                                     
    -D, --systemproperty <argument>=<value>                                                                                                                             
            Define additional system properties                                                                                                                         
    -S, --systemPropertyFile <argument>
            additional system property file(s)
    -L, --loglevel <argument>=<value>
            [category=]level e.g. jorphan=INFO or jmeter.util=DEBUG
    -r, --runremote
            Start remote servers (as defined in remote_hosts)
    -R, --remotestart <argument>
            Start these remote servers (overrides remote_hosts)
    -d, --homedir <argument>
            the jmeter home directory to use
    -X, --remoteexit
            Exit the remote servers at end of test (non-GUI)

这篇关于需要分步指南在Ubuntu上以Jenkins(带有Hudson版本)执行Jmeter脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆