Visual Studio Team services - load testing - JMeter - path to supporting files - jmeter

I'd like to use Visual Studio Team Services to run load testing plan written in JMeter in cloud. In my test I have to upload file.
I guess I should attach this file to 'Supporting files' field, but I have no idea what is the path to this file. There are error message:
HttpError Non HTTP response code: java.io.FileNotFoundException Agent000 | Thread Group | Upload | Non HTTP response message: test.xml (The system cannot find the file specified)
I've tried some paths which I found in log, eg: E:\approot\JMeterLoadTest\, but there are error anyway.
What is the path to file added to 'Supporting files'? Has anybody had similiar problem?

You can define "User Defined Variables" and use BeanShell.
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="testURL" elementType="Argument">
<stringProp name="Argument.name">testURL</stringProp>
<stringProp name="Argument.value">www.datafilehost.com</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="testFile" elementType="Argument">
<stringProp name="Argument.name">testFile</stringProp>
<stringProp name="Argument.value">upload.txt</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="scriptPath" elementType="Argument">
<stringProp name="Argument.name">scriptPath</stringProp>
<stringProp name="Argument.value">${__BeanShell(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}${__BeanShell(File.separator,)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</Arguments>
and than you can load file from your base dir:
<elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs">
<collectionProp name="HTTPFileArgs.files">
<elementProp name="${scriptPath}${testFile}" elementType="HTTPFileArg">
<stringProp name="File.path">${scriptPath}${testFile}</stringProp>
<stringProp name="File.paramname">upfile</stringProp>
<stringProp name="File.mimetype">text/plain</stringProp>
</elementProp>
</collectionProp>
</elementProp>
Full sample:
https://github.com/aliesbelik/jmx/blob/master/so/2015-04-15_file-upload-download.jmx

Related

Does anyone know what is wrong with my YAML?

I have recently started learning YAML to use with AWS CloudFormation. It is a part of a course I am doing. I have written my YAML but my stack gives something different to what is expected in the designer.
This is my YAML
Parameters:
EnvironmentName:
Description: An environment name that is prefixed to resource names
Type: String
Default: DE-Extract
VpcCIDR:
Description: Please enter the IP range (CIDR notation) for this VPC
Type: String
Default: 192.168.0.0/16
DataCenterPublicSubnetCIDR:
Description: Please enter the IP range (CIDR notation) for the public subnet in the first Availability Zone
Type: String
Default: 192.168.10.0/24
Resources:
VPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock:
Ref: VpcCIDR
EnableDnsSupport: 'true'
EnableDnsHostnames: 'true'
Tags:
- Key: Name
Value:
Ref: EnvironmentName
InternetGateway:
Type: AWS::EC2::InternetGateway
Properties:
Tags:
- Key: Name
Value:
Ref: EnvironmentName
InternetGatewayAttachment:
Type: AWS::EC2::VPCGatewayAttachment
Properties:
InternetGatewayId: InternetGateway
VpcId:
Ref: VPC
DataCenterPublicSubnet:
Type: AWS::EC2::Subnet
Properties:
VpcId:
Ref: VPC
CidrBlock:
Ref: DataCenterPublicSubnetCIDR
AvailabilityZone: !Select [0, !GetAZs '']
MapPublicIpOnLaunch: true
Tags:
- Key: Name
Value: DE-Extract Data Center Subnet
PublicRouteTable:
Type: AWS::EC2::RouteTable
Properties:
VpcId:
Ref: VPC
Tags:
- Key: Name
Value: DE-Extract Public Routes
DefaultPublicRoute:
Type: AWS::EC2::Route
DependsOn: InternetGatewayAttachment
Properties:
RouteTableId:
Ref: PublicRouteTable
DestinationCidrBlock: 0.0.0.0/0
GatewayId:
Ref: InternetGateway
DataCenterPublicSubnetRouteTableAssociation:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
SubnetId:
Ref: DataCenterPublicSubnet
RouteTableId:
Ref: PublicRouteTable
WindowsInstanceSG:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId:
Ref: VPC
GroupName: DE-Extract-WindowsInstanceSG
GroupDescription: This group permits RDP access to an instance deployed within the public subnet of the VPC.
SecurityGroupIngress:
- IpProtocol: tcp
CidrIp: 0.0.0/0
FromPort: 3389
ToPort: 3389
Tags:
- Key: Name
Value: DE-Extract-WindowsInstanceSG
FileServerSG:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId:
Ref: VPC
GroupName: DE-Extract-FileServerSG
GroupDescription: is responsible for permitting ssh access to the data center's file server from an internal source within the VPC.
SecurityGroupIngress:
- IpProtocol: tcp
CidrIp: 192.168.10.0/24
FromPort: 22
ToPort: 22
Tags:
Key: Name
Value: DE-Extract-FileServerSG
FileGatewaySG:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId:
Ref: VPC
GroupName: DE-Extract-FileGatewaySG
GroupDescription: This security group controls the access to the file gateway instance configured later on
SecurityGroupIngress:
- IpProtocol: tcp
CidrIp: 192.168.0.0/16
FromPort: 1
ToPort: 65534
This is what i am getting.
This is what i need
I am not too sure what is wrong, any form of direction would be much appreciated. I think theres an issue with the referencing (i was originally using !Ref and changed it to long form but nothng changed)

How to update a file application.properties in EC2 instance from an external file (e.g from S3 bucket) using CloudFormation script?

I can update the application.properties and restart the service using the following CloudFormation template. But I want to update the application.properties file from an external file (e.g: S3 or git) instead of a script.
How can I achieve this?
My CF template,
AWSTemplateFormatVersion: '2010-09-09'
Description: AWS CloudFormation Template with EC2InstanceWithSecurityGroup
Parameters:
KeyName:
Description: Name of an existing EC2 KeyPair to enable SSH access to the instance
Type: AWS::EC2::KeyPair::KeyName
ConstraintDescription: must be the name of an existing EC2 KeyPair.
InstanceType:
Description: EC2 instance type
Type: String
Default: t2.medium
AllowedValues:
- t2.medium
- t2.large
ConstraintDescription: must be a valid EC2 instance type.
RemoteAccessLocation:
Description: The IP address range that can be used to access to the EC2 instances
Type: String
MinLength: '9'
MaxLength: '18'
Default: 0.0.0.0/0
AllowedPattern: (\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2})
ConstraintDescription: must be a valid IP CIDR range of the form x.x.x.x/x.
Resources:
S3Bucket:
Type: 'AWS::S3::Bucket'
DeletionPolicy: Retain
Properties:
BucketName: my-test-bucket
AccessControl: Private
EC2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType: !Ref 'InstanceType'
SecurityGroups:
- !Ref 'InstanceSecurityGroup'
KeyName: !Ref 'KeyName'
ImageId: ami-xxxxxxxxxxxxxxxx
UserData:
Fn::Base64: !Sub |
#!/bin/bash -ex
cat >/usr/local/application.properties <<EOL
amazon.s3.bucket-name=${S3Bucket}
amazon.s3.region=ap-south-1
amazon.s3.access-key=xxxxxxxxxxxxxxxxxxx
amazon.s3.secret-key=yyyyyyyyyyyyyyyyxxxxxxxxx
## H2 Config
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=username
spring.datasource.password=password
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=update
EOL
## Restart our service
sudo systemctl restart myapplication.service
InstanceSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Enable SSH (22), HTTP (8080)
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: '22'
ToPort: '22'
CidrIp: !Ref 'RemoteAccessLocation'
- CidrIp: 0.0.0.0/0
FromPort: '8080'
IpProtocol: tcp
ToPort: '8080'
Outputs:
InstanceId:
Description: InstanceId of the newly created EC2 instance
Value: !Ref 'EC2Instance'
AZ:
Description: Availability Zone of the newly created EC2 instance
Value: !GetAtt 'EC2Instance.AvailabilityZone'
PublicDNS:
Description: Public DNSName of the newly created EC2 instance
Value: !GetAtt 'EC2Instance.PublicDnsName'
PublicIP:
Description: Public IP address of the newly created EC2 instance
Value: !GetAtt 'EC2Instance.PublicIp'
Any inputs here really appreciated.
You have to create AWS::IAM::InstanceProfile with AWS::IAM::Role that has read permissions to S3 or to a specific bucket/object. Then you use aws CLI in your user data to get the file from s3 into your instance. I don't know what is your AMI, but if its standard Amazon Linux 2 or Ubuntu, it will have AWS CLI already installed.
AWSTemplateFormatVersion: '2010-09-09'
Description: AWS CloudFormation Template with EC2InstanceWithSecurityGroup
Parameters:
KeyName:
Description: Name of an existing EC2 KeyPair to enable SSH access to the instance
Type: AWS::EC2::KeyPair::KeyName
ConstraintDescription: must be the name of an existing EC2 KeyPair.
InstanceType:
Description: EC2 instance type
Type: String
Default: t2.medium
AllowedValues:
- t2.medium
- t2.large
ConstraintDescription: must be a valid EC2 instance type.
RemoteAccessLocation:
Description: The IP address range that can be used to access to the EC2 instances
Type: String
MinLength: '9'
MaxLength: '18'
Default: 0.0.0.0/0
AllowedPattern: (\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2})
ConstraintDescription: must be a valid IP CIDR range of the form x.x.x.x/x.
Resources:
S3Bucket:
Type: 'AWS::S3::Bucket'
DeletionPolicy: Retain
Properties:
BucketName: my-test-bucket
AccessControl: Private
MyInstanceRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal: {'Service': ['ec2.amazonaws.com']}
Action: ['sts:AssumeRole']
ManagedPolicyArns:
- arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
Path: '/'
MyInstanceProfile:
Type: AWS::IAM::InstanceProfile
Properties:
Roles:
- !Ref MyInstanceRole
EC2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType: !Ref 'InstanceType'
SecurityGroups:
- !Ref 'InstanceSecurityGroup'
KeyName: !Ref 'KeyName'
ImageId: ami-xxxxxxxxxxxxxxxx
IamInstanceProfile: !Ref MyInstanceProfile
UserData:
Fn::Base64: !Sub |
#!/bin/bash -ex
aws s3 cp s3://<your-bucket-with-settings>/application.properties /usr/local/application.properties
## Restart our service
sudo systemctl restart myapplication.service
InstanceSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Enable SSH (22), HTTP (8080)
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: '22'
ToPort: '22'
CidrIp: !Ref 'RemoteAccessLocation'
- CidrIp: 0.0.0.0/0
FromPort: '8080'
IpProtocol: tcp
ToPort: '8080'
Outputs:
InstanceId:
Description: InstanceId of the newly created EC2 instance
Value: !Ref 'EC2Instance'
AZ:
Description: Availability Zone of the newly created EC2 instance
Value: !GetAtt 'EC2Instance.AvailabilityZone'
PublicDNS:
Description: Public DNSName of the newly created EC2 instance
Value: !GetAtt 'EC2Instance.PublicDnsName'
PublicIP:
Description: Public IP address of the newly created EC2 instance
Value: !GetAtt 'EC2Instance.PublicIp'

How to setup Zuul settings

I have a problem, I think it's about Zuul's rescues. I searched the internet but found nothing to fix this error.
I have a login in the project, but first I have to create a user and when I do this I get this error. When creating a user, I just send the nickname and password in the form of JSON. After sending JSON, the user is not saved to db.
its logs form zuul
WARN 11880 --- [io-4200-exec-10] c.n.zuul.http.HttpServletRequestWrapper : Content-length different from byte array length! cl=56, array=0
2020-09-16 17:57:28.914 WARN 11880 --- [io-4200-exec-10] o.s.c.n.z.filters.post.SendErrorFilter : Error during filtering
com.netflix.zuul.exception.ZuulException:
at org.springframework.cloud.netflix.zuul.filters.post.SendErrorFilter.findZuulException(SendErrorFilter.java:118) ~[spring-cloud-netflix-zuul-2.2.3.RELEASE.jar:2.2.3.RELEASE]
at org.springframework.cloud.netflix.zuul.filters.post.SendErrorFilter.run(SendErrorFilter.java:78) ~[spring-cloud-netflix-zuul-2.2.3.RELEASE.jar:2.2.3.RELEASE]
at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:117) ~[zuul-core-1.3.1.jar:1.3.1]
at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:193) ~[zuul-core-1.3.1.jar:1.3.1]
at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:157) ~[zuul-core-1.3.1.jar:1.3.1]
at com.netflix.zuul.FilterProcessor.error(FilterProcessor.java:105) ~[zuul-core-1.3.1.jar:1.3.1]
at com.netflix.zuul.ZuulRunner.error(ZuulRunner.java:112) ~[zuul-core-1.3.1.jar:1.3.1]
at com.netflix.zuul.http.ZuulServlet.error(ZuulServlet.java:145) ~[zuul-core-1.3.1.jar:1.3.1]
bootstrap.yml form gateway
spring:
application:
name: gateway-server
cloud:
config:
enabled: false
uri: http://localhost:8888
fail-fast: true
retry:
max-attempts: 20
server:
port: 4200
zuul:
prefix: /api
routes:
credit-service:
path: /credit/**
serviceId: credit-service
auth-service:
path: /auth/**
serviceId: auth-service
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 80000
ribbon:
ReadTimeout: 20000
ConnectTimeout: 20000
and this is log from auth-service when I create user
WARN 11216 --- [o-auto-1-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: I/O error while reading input message; nested exception is org.apache.catalina.connector.ClientAbortException: java.io.EOFException: Unexpected EOF read on the socket]
Edit
IllegalStateException: Cannot call sendError() after the response has been committed] with root cause
java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:472) ~[tomcat-embed-core-9.0.36.jar:9.0.36]
at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:129) ~[tomcat-embed-core-9.0.36.jar:9.0.36]
at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:129) ~[tomcat-embed-core-9.0.36.jar:9.0.36]
at org.springframework.security.web.util.OnCommittedResponseWrapper.sendError(OnCommittedResponseWrapper.java:115) ~[spring-security-web-5.3.3.RELEASE.jar:5.3.3.RELEASE]
at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:488) ~[spring-webmvc-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:53) ~[spring-webmvc-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.7.RELEASE.jar:5.2.7.RELEASE]
I solved the problem. I had to improve JwtAuthorizationFilter

Proxy authorization required error in WSO2 API Manager

I'm using WSO2 API Manager 2.0 and have configured it to use a proxy by adding the following configuration to the axis2.xml and synapse.xml. However, when I try to access the test API I've made, I get the errors "Proxy Authorization required" or "Server Hangup". When I tried to see the requests made over the wire, I saw that there were two requests going - A GET request (which receives the Server Hangup error) that has the Proxy Authentication header, and a CONNECT request (which receives the Proxy Authorization required error) that doesn't. Why is this happening and how can I make the header appear in every request?
axis2.xml:
<transportSender name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpSender">
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="http.proxyHost" locked="false">10.1.0.236</parameter>
<parameter name="http.proxyPort" locked="false">80</parameter>
</transportSender>
<transportSender name="https" class="org.apache.synapse.transport.passthru.PassThroughHttpSSLSender">
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="http.proxyHost" locked="false">10.1.0.236</parameter>
<parameter name="http.proxyPort" locked="false">80</parameter>
<parameter name="keystore" locked="false">
<KeyStore>
<Location>repository/resources/security/wso2carbon.jks</Location>
<Type>JKS</Type>
<Password>wso2carbon</Password>
<KeyPassword>wso2carbon</KeyPassword>
</KeyStore>
</parameter>
<parameter name="truststore" locked="false">
<TrustStore>
<Location>repository/resources/security/client-truststore.jks</Location>
<Type>JKS</Type>
<Password>wso2carbon</Password>
</TrustStore>
</parameter>
<parameter name="HostnameVerifier">AllowAll</parameter>
<!--supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
</transportSender>
synapse.xml:
<definitions xmlns="http://ws.apache.org/ns/synapse">
<sequence xmlns="http://ws.apache.org/ns/synapse" name="WSO2AM--Ext--In">
<property name="Proxy-Authorization" expression="fn:concat('Basic ', base64Encode('smsapp:let$c0nnect'))" scope="transport"/>
<property name="POST_TO_URI" value="true" scope="axis2"/>
<property name="DISABLE_CHUNKING" value="true" scope="axis2"/>
<log level="custom">
<property name="TRACE" value="Global Mediation Extension2"/>
</log>
</sequence>
<!-- You can add any flat sequences, endpoints, etc.. to this synapse.xml file if you do
*not* want to keep the artifacts in several files -->
</definitions>
Requests and their responses:
GET
GET https://apiurl.com/api/apiname HTTP/1.1\r\n
[Expert Info (Chat/Sequence): GET https://apiurl.com/api/apiname HTTP/1.1\r\n]
[GET https://apiurl.com/api/apiname HTTP/1.1\r\n]
[Severity level: Chat]
[Group: Sequence]
Request Method: GET
Request URI: https://apiurl.com/api/apiname
Request Version: HTTP/1.1
Proxy-Authorization: Basic XXXXXXXXXXXXXXXX\r\n
Credentials: username:pwd
Hypertext Transfer Protocol
HTTP/1.1 502 Server Hangup\r\n
[Expert Info (Chat/Sequence): HTTP/1.1 502 Server Hangup\r\n]
[HTTP/1.1 502 Server Hangup\r\n]
[Severity level: Chat]
[Group: Sequence]
Request Version: HTTP/1.1
Status Code: 502
Response Phrase: Server Hangup
Date: Thu, 08 Dec 2016 12:12:20 GMT\r\n
Connection: close\r\n
Via: HTTPS/1.1 localhost.localdomain\r\n
Cache-Control: no-store\r\n
Content-Type: text/html\r\n
Content-Language: en\r\n
Content-Length: 666\r\n
\r\n
[HTTP response 1/1]
[Time since request: 0.235017000 seconds]
[Request in frame: 456]
File Data: 666 bytes
CONNECT
Hypertext Transfer Protocol
CONNECT apiurl.com:443 HTTP/1.1\r\n
[Expert Info (Chat/Sequence): CONNECT apiurl.com:443 HTTP/1.1\r\n]
[CONNECT apiurl.com:443 HTTP/1.1\r\n]
[Severity level: Chat]
[Group: Sequence]
Request Method: CONNECT
Request URI: apiurl.com:443
Request Version: HTTP/1.1
Host: apiurl.com:443\r\n
Proxy-Connection: Keep-Alive\r\n
\r\n
[Full request URI: apiurl.com:443]
[HTTP request 1/2]
[Response in frame: 595]
[Next request in frame: 880]
Hypertext Transfer Protocol
HTTP/1.1 407 Proxy Authorization Required\r\n
[Expert Info (Chat/Sequence): HTTP/1.1 407 Proxy Authorization Required\r\n]
[HTTP/1.1 407 Proxy Authorization Required\r\n]
[Severity level: Chat]
[Group: Sequence]
Request Version: HTTP/1.1
Status Code: 407
Response Phrase: Proxy Authorization Required
Date: Thu, 08 Dec 2016 12:12:22 GMT\r\n
Proxy-Connection: keep-alive\r\n
Via: 1.1 localhost.localdomain\r\n
Cache-Control: no-store\r\n
Content-Type: text/html\r\n
Content-Language: en\r\n
Proxy-Authenticate: Basic realm="Websense Content Gateway"\r\n
Content-Length: 666\r\n
\r\n
[HTTP response 1/2]
[Time since request: 0.002752000 seconds]
[Request in frame: 589]
[Next request in frame: 880]
[Next response in frame: 894]
File Data: 666 bytes
Here's a solution that worked for me (I use ESB 5.0.0, not API Manager).
In my case I had to add proxyProfiles to my HTTP and HTTPS sender in axis2. So I had to:
Delete proxy parameters in http and https sender:
<parameter name="http.proxyHost" locked="false">some_host</parameter>
<parameter name="http.proxyPort" locked="false">some_port</parameter>
Add parameter ProxyProfiles (in both http and https sender)
<parameter name="proxyProfiles">
<profile>
<targetHosts>*</targetHosts>
<proxyHost>some_host</proxyHost>
<proxyPort>some_port</proxyPort>
<proxyUserName>some_username</proxyUserName>
<proxyPassword>some_password</proxyPassword>
</profile>
</parameter>
In my .xml API I deleted the Proxy-Authorization and POST_TO_URI.
more details:
Working with Proxy Servers (wso2.com)
edit:
after few more tests seems that HTTP needs Proxy-Authorization and POST_TO_URI parameters in API, but HTTPS instead of them needs proxyProfiles as I mentioned before. Without this it's impossible to call HTTPS service.

JMeter 3.0 testplan doesn't work in non GUI mode

The plan runs fine in GUI mode.
It also runs in non GUI-mode, but doesn't send proper(?) HTTP requests...
This is how I launch it:
sh jmeter.sh -n -t thread-test.jmx -l thread-test.csv
When running in the GUI the request is correct:
GET http://www.bing.com/
[no cookies]
Request Headers:
Connection: keep-alive
Host: www.bing.com
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_73)
But when run using non GUI-mode the request has no data to display:
No data to display
The sampler result looks like this:
Thread Name: Thread Group 1-1
Sample Start: 2016-11-01 15:24:04 CET
Load time: 141
Connect Time: 0
Latency: 141
Size in bytes: 85790
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 0
Data type ("text"|"bin"|""): text
Response code: 200
Response message: OK
Response headers:
SampleResult fields:
ContentType:
DataEncoding: null
Any idea? I'm stumped...
Here's the test plan:
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.9" jmeter="3.0 r1743807">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">1</stringProp>
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
<longProp name="ThreadGroup.start_time">1478003529000</longProp>
<longProp name="ThreadGroup.end_time">1478003529000</longProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">www.bing.com</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path"></stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp>
<boolProp name="HTTPSampler.image_parser">true</boolProp>
<boolProp name="HTTPSampler.concurrentDwn">true</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
</HTTPSamplerProxy>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
</value>
</objProp>
<stringProp name="filename">/Users/jboive/Downloads/apache-jmeter-3.0/bin/thread-test.csv</stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>
Here's the log:
2016/11/01 15:24:31 INFO - jmeter.util.JMeterUtils: Setting Locale to en_US
2016/11/01 15:24:31 INFO - jmeter.JMeter: Loading user properties from: /Users/jboive/Downloads/apache-jmeter-3.0/bin/user.properties
2016/11/01 15:24:31 INFO - jmeter.JMeter: Loading system properties from: /Users/jboive/Downloads/apache-jmeter-3.0/bin/system.properties
2016/11/01 15:24:31 INFO - jmeter.JMeter: Copyright (c) 1998-2016 The Apache Software Foundation
2016/11/01 15:24:31 INFO - jmeter.JMeter: Version 3.0 r1743807
2016/11/01 15:24:31 INFO - jmeter.JMeter: java.version=1.8.0_73
2016/11/01 15:24:31 INFO - jmeter.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2016/11/01 15:24:31 INFO - jmeter.JMeter: os.name=Mac OS X
2016/11/01 15:24:31 INFO - jmeter.JMeter: os.arch=x86_64
2016/11/01 15:24:31 INFO - jmeter.JMeter: os.version=10.12.1
2016/11/01 15:24:31 INFO - jmeter.JMeter: file.encoding=UTF-8
2016/11/01 15:24:31 INFO - jmeter.JMeter: Max memory =514850816
2016/11/01 15:24:31 INFO - jmeter.JMeter: Available Processors =8
2016/11/01 15:24:31 INFO - jmeter.JMeter: Default Locale=English (United States)
2016/11/01 15:24:31 INFO - jmeter.JMeter: JMeter Locale=English (United States)
2016/11/01 15:24:31 INFO - jmeter.JMeter: JMeterHome=/Users/jboive/Downloads/apache-jmeter-3.0
2016/11/01 15:24:31 INFO - jmeter.JMeter: user.dir =/Users/jboive/Downloads/apache-jmeter-3.0/bin
2016/11/01 15:24:31 INFO - jmeter.JMeter: PWD =/Users/jboive/Downloads/apache-jmeter-3.0/bin
2016/11/01 15:24:31 INFO - jmeter.JMeter: IP: 10.0.1.19 Name: iMac.local FullName: 10.0.1.19
2016/11/01 15:24:31 INFO - jmeter.gui.action.LookAndFeelCommand: Using look and feel: com.apple.laf.AquaLookAndFeel [Mac OS X, System]
2016/11/01 15:24:31 INFO - jmeter.JMeter: Loaded icon properties from org/apache/jmeter/images/icon.properties
2016/11/01 15:24:33 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2016/11/01 15:24:33 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2016/11/01 15:24:35 INFO - org.jmeterplugins.repository.PluginManager: Plugins Status: [jpgc-graphs-basic=2.0, jpgc-graphs-additional=2.0, jpgc-autostop=0.1, blazemeter-debugger=0.3, jpgc-functions=2.0, jmeter-ftp=3.0, jpgc-filterresults=2.1, jmeter-http=3.0, jmeter-jdbc=3.0, jmeter-jms=3.0, jmeter-monitors=3.0, jmeter-core=3.0, jmeter-junit=3.0, jmeter-java=3.0, jmeter-ldap=3.0, jmeter-mail=3.0, jmeter-mongodb=3.0, jmeter-native=3.0, jpgc-plugins-manager=0.10, jpgc-synthesis=2.0, jmeter-tcp=3.0, jmeter-components=3.0]
2016/11/01 15:24:36 INFO - jmeter.util.BSFTestElement: Registering JMeter version of JavaScript engine as work-round for BSF-22
2016/11/01 15:24:36 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/11/01 15:24:36 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/11/01 15:24:36 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/11/01 15:24:36 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/11/01 15:24:36 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2016/11/01 15:24:36 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser
2016/11/01 15:24:37 INFO - jorphan.exec.KeyToolUtils: keytool found at 'keytool'
2016/11/01 15:24:37 INFO - jmeter.protocol.http.proxy.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file /Users/jboive/Downloads/apache-jmeter-3.0/bin/proxyserver.jks
2016/11/01 15:24:37 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.config.MongoSourceElement
2016/11/01 15:24:37 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.sampler.MongoScriptSampler
2016/11/01 15:24:37 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.visualizers.DistributionGraphVisualizer
2016/11/01 15:24:37 INFO - jmeter.samplers.SampleResult: Note: Sample TimeStamps are START times
2016/11/01 15:24:37 INFO - jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1
2016/11/01 15:24:37 INFO - jmeter.samplers.SampleResult: sampleresult.useNanoTime=true
2016/11/01 15:24:37 INFO - jmeter.samplers.SampleResult: sampleresult.nanoThreadSleep=5000
2016/11/01 15:24:37 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.visualizers.SplineVisualizer
2016/11/01 15:24:49 INFO - jmeter.services.FileServer: Default base='/Users/jboive/Downloads/apache-jmeter-3.0/bin'
2016/11/01 15:24:49 INFO - jmeter.gui.action.Load: Loading file: /Users/jboive/Downloads/apache-jmeter-3.0/bin/thread-test.jmx
2016/11/01 15:24:49 INFO - jmeter.services.FileServer: Set new base='/Users/jboive/Downloads/apache-jmeter-3.0/bin'
2016/11/01 15:24:49 INFO - jmeter.save.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2
2016/11/01 15:24:49 INFO - jmeter.save.SaveService: Using SaveService properties file encoding UTF-8
2016/11/01 15:24:49 INFO - jmeter.save.SaveService: Using SaveService properties version 2.9
2016/11/01 15:24:49 INFO - jmeter.save.SaveService: All converter versions present and correct
2016/11/01 15:24:49 INFO - jmeter.save.SaveService: Loading file: /Users/jboive/Downloads/apache-jmeter-3.0/bin/thread-test.jmx
2016/11/01 15:24:49 INFO - jmeter.services.FileServer: Set new base='/Users/jboive/Downloads/apache-jmeter-3.0/bin'
2016/11/01 15:24:53 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2016/11/01 15:29:59 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2016/11/01 15:29:59 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2016/11/01 15:29:59 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*)
2016/11/01 15:29:59 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2016/11/01 15:29:59 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2016/11/01 15:29:59 INFO - jmeter.engine.StandardJMeterEngine: Test will stop on error
2016/11/01 15:29:59 INFO - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
2016/11/01 15:29:59 INFO - jmeter.threads.ThreadGroup: Started thread group number 1
2016/11/01 15:29:59 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started
2016/11/01 15:29:59 INFO - jmeter.threads.JMeterThread: Thread started: Thread Group 1-1
2016/11/01 15:29:59 INFO - jmeter.protocol.http.sampler.HTTPHCAbstractImpl: Local host = iMac.local
2016/11/01 15:29:59 INFO - jmeter.protocol.http.sampler.HTTPHC4Impl: HTTP request retry count = 0
2016/11/01 15:29:59 INFO - jmeter.protocol.http.parser.BaseParser: Created org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/11/01 15:29:59 INFO - jmeter.threads.JMeterThread: Thread is done: Thread Group 1-1
2016/11/01 15:29:59 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2016/11/01 15:29:59 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2016/11/01 15:29:59 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)
There's nothing wrong here.
In GUI mode, View Results Tree shows all fields.
In non GUI mode, the output you have set for View Results Tree is CSV which does not store all fields like response data, encoding ...
That's why you don't have all data.
To have what you want, click on "Configure" button in View Results Tree and select XML fields. Rename you file to thread-test.xml.
Actually your Test Plan does work, it just stores a limited subset of metrics in the .jtl results file which is enough to populate listeners like Aggregate Report or to build HTML Reporting Dashboard.
The data is being cut as saving requests and especially responses causes massive disk IO overhead and consumes a lot of memory, that's why it is recommended avoid saving the extra data or to do it only when an error occur.
If for some reason you need to have the full picture in non-GUI mode it is controllable via JMeter Properties. In order to get the same level of details as for the GUI mode add the following lines to user.properties file (lives in JMeter's "bin" folder)
jmeter.save.saveservice.output_format=xml
jmeter.save.saveservice.response_data=true
jmeter.save.saveservice.samplerData=true
jmeter.save.saveservice.requestHeaders=true
jmeter.save.saveservice.url=true
jmeter.save.saveservice.responseHeaders=true
JMeter restart will be required to pick the properties up. See Apache JMeter Properties Customization Guide to learn more about JMeter Properties and ways of setting and/or overriding them

Resources