Jmeter5.0+Ant集成 build.xml配置

Jmeter5.0+Ant集成 build.xml配置

  1. jmeter 和ANT的安装
  2. 修改jmeter/bin目录下的jmeter.properties,将jmeter输出文件格式改为xml,同时将文件的样式都启用改为true,修改内容如下:可直接复制,也可以手动修改
jmeter.save.saveservice.output_format=xml

# The below properties are true when field should be saved; false otherwise
#
# assertion_results_failure_message only affects CSV output
#jmeter.save.saveservice.assertion_results_failure_message=true
#
# legitimate values: none, first, all
#jmeter.save.saveservice.assertion_results=none
#

jmeter.save.saveservice.data_type=true
jmeter.save.saveservice.label=true
jmeter.save.saveservice.response_code=true
# response_data is not currently supported for CSV output
jmeter.save.saveservice.response_data=true
# Save ResponseData for failed samples
jmeter.save.saveservice.response_data.on_error=false
jmeter.save.saveservice.response_message=true
jmeter.save.saveservice.successful=true
jmeter.save.saveservice.thread_name=true
jmeter.save.saveservice.time=true
jmeter.save.saveservice.subresults=true
jmeter.save.saveservice.assertions=true
jmeter.save.saveservice.latency=true
jmeter.save.saveservice.connect_time=true
jmeter.save.saveservice.samplerData=true
jmeter.save.saveservice.responseHeaders=true
jmeter.save.saveservice.requestHeaders=true
jmeter.save.saveservice.encoding=false
jmeter.save.saveservice.bytes=true
jmeter.save.saveservice.url=true
jmeter.save.saveservice.filename=true
jmeter.save.saveservice.hostname=true
jmeter.save.saveservice.thread_counts=true
jmeter.save.saveservice.sample_count=true
jmeter.save.saveservice.idle_time=true
  1. 下载style文件:jmeter.results.shanhe.me.xsl(优化html报告,更加详细)
  2. 配置build.xml的内容


      
        
    
      
    
    
     
    
    
    
    
      
    
    
    
	
	
	
	


    
        
        
    

    
        
        
            
            

            
        
    

    
        
        
    


    
         
		
              
              
               
		
                 
        
            
                
                
            
        
    


附上build.xml的目录
Jmeter5.0+Ant集成 build.xml配置_第1张图片

当当当,最终结果
Jmeter5.0+Ant集成 build.xml配置_第2张图片

你可能感兴趣的:(接口自动化)