Jenkins的Jmeter测试失败," errorlevel = 255"错误

时间:2017-10-30 11:11:23

标签: windows batch-file jenkins jmeter

我正在尝试使用Jenkins从Windows命令行运行jmeter测试,并在构建步骤中收到错误。错误是:

" errorlevel=255 Press any key to continue . . . Build step 'Execute Windows batch command' marked build as failure"

可执行Windows批处理命令是:

C:\Ankush\EssentBE\PerformanceTesting\apache-jmeter-3.3\apache-jmeter-
3.3\bin\jmeter.bat -Jjmeter.save.saveservice.output_format=csv -n -t 
C:\Users\a.panday\git\performance-tests\dwp.jmx -l 
C:\Ankush\EssentBE\PerformanceTesting\Results\Test.csv -j test_local.log ^
-JthinkTime=500 ^
-JthreadDelay=1000 ^
-Jdwpserver= abc.bac.com^
-Juserid= abc ^
-Jpassword= abc ^
-Jprotocol=https ^
-Jtc1RenewalsSelectionCriteriaEndDateFrom= ^
-Jtc1RenewalsSelectionCriteriaEndDateTo= ^
-JtimeOutInSecondsForPassiveRenewalsTC1Jobs= ^
-JdelayInMilisecondsBeforeCheckingOrdersInJbillingForTC1PR= ^
-Jrampup=2 ^
-Jloopcount=1 ^
-Jrenewalthread=0 ^
-Jtest_load_Account_screen=1 ^
-Jtest_load_List_of_contracts_sales_marketing_menu=1 ^
-Jtest_load_List_of_contracts_contract_switching_menu=1 ^
-Jtest_load_List_of_contracts_contract_switching_menu_filtered=1 ^
-Jtest_load_List_quotes_sales_marketing_menu=1 ^
-Jtest_load_List_quotes_sales_marketing_menu_filtered=1 ^
-Jtest_load_account_cockpit_billing_And_InvoiceDetails=1 ^
-Jtest_load_Contract_details_page=1 ^
-Jtest_load_Quote_details_page=1 ^
-Jtest_load_creation_and_saving_of_a_guidance_flow=1 ^
-Jtest_load_creation_of_a_quote_cqfa=1 ^
-Jtest_load_determine_quote_price=1 ^
-Jtest_load_creation_of_a_case=1 ^
-Jtest_load_creation_and_saving_of_a_guidance_flow_B2C=1 ^
-Jtest_load_market_transaction_screen=1 ^
-Jtest_load_market_transaction_task_screen=1 ^
-Jtest_load_market_transaction_filter_ean_screen=1 ^
-Jtest_load_market_transaction_filter_account_screen=1 ^
-Jtest_load_market_transaction_filter_status_screen=1 ^
-Jtest_load_market_transaction_task_filter_ean_screen=1 ^
-Jtest_load_market_transaction_task_filter_account_screen=1 ^
-Jtest_load_market_transaction_task_filter_status_screen=1 ^
-Jtest_load_market_transaction_task_restart=1 ^
-Jjmeter.save.saveservice.bytes=true ^
-Jjmeter.save.saveservice.label=true ^
-Jjmeter.save.saveservice.latency=true ^
-Jjmeter.save.saveservice.response_code=true ^
-Jjmeter.save.saveservice.response_message=true ^
-Jjmeter.save.saveservice.successful=true ^
-Jjmeter.save.saveservice.thread_counts=true ^
-Jjmeter.save.saveservice.thread_name=true ^
-Jjmeter.save.saveservice.time=true ^
-Jjmeter.save.saveservice.connect_time=true ^
-Jjmeter.save.saveservice.timestamp_format="yyyy/MM/dd HH:mm:ss"`

上面的命令在windows命令行中运行正常,但在Jenkins构建时给出了声明的错误。

感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

如果您发现=符号和属性值之间有空格

-Jdwpserver = 空格 abc.bac.com ^

您在以下属性中阻止JMeter执行的空间:

-Jdwpserver= abc.bac.com^
-Juserid= abc ^
-Jpassword= abc ^

-Jtc1RenewalsSelectionCriteriaEndDateFrom= ^
-Jtc1RenewalsSelectionCriteriaEndDateTo= ^
-JtimeOutInSecondsForPassiveRenewalsTC1Jobs= ^
-JdelayInMilisecondsBeforeCheckingOrdersInJbillingForTC1PR= ^

只需删除空格即可使用