Tag Archives: Automated Testing

JMeter running error response code: non HTTP response code: java.lang.illegalargumentexception find and solve

JMeter operation error

Response code: non HTTP response code: java.lang.illegalargumentexception
response message: non HTTP response message: bound must be greater than origin

the error is due to the problem of parameter transmission. First, we need to check whether the parameter is correct

after checking, we find that the name is wrong, The case is not distinguished, so it can’t be found all the time. It’s successful to run after modification.

Httprunner v3. X generates HTML report in assure format

This document records the process and steps of the initial report generation with allure.

Install allure first, download and configure the environment
reference documents:


After installation, the following steps begin:

Step 1: generate report data with assure. The generated report data includes two files: one JSON file and one TXT file.

Switch to D: Python/Test & gt; The following is implemented:

hrun test_post_api.json --alluredir=report

Step 2: create the report data generated just now with assure, generate the report2 folder, – O means to specify the folder to generate the report, – C means to clean up the previous report directory before generating the report.

allure generate D:\Python\test\report -o D:\Python\test\report2 -c

Then open the assure report using the default browser to view it.

allure open D:\Python\test\report2

end. The effect of successful generation:

[frequently asked questions]

1. If the error prompt oserror: [winerror 6] handle is invalid, please refer to the document for solution:


Add some code to runner. Py’s test_ Start method, and import colorama, Sys at the beginning of the file

2. If the Chinese encoding in the return body fails, please refer to the document for solution:


Add some code to the log of client. Py_ In the print method, the default ASCII encoding is used for Chinese when json.dumps is serialized. To output real Chinese, you need to specify ensure_ ascii=False

[allure grammar]

$Hrun — alluredir allure results — clean alluredir # when the use case format is py file, you can replace “Hrun” with “pytest”, which has the same effect
– alluredir: generate the original data of allure report
allure results: save location of the original data
– clean alluredir: clear the historical data of allure results

$assure generate assure results – O assure report
– O specify the folder to generate the report
– C clean up the previous report directory before generating the report

Assure open assure report: start the default browser to open the assure test report

How to Solve Bat Script Error: system error 85 has occurred

A problem,
This error is thrown when using the BAT script to copy files from a remote server

System error 85 has occurred
The local device name is already in use

My script USES disk mapping, something like this

:: Delete the last set mapping
net use Y /delete /y
:: Disk mapping
net use Y: \\ServerName\shares \\ServerName\shares /user:password /persistent:yes

Without further explanation, Google System Error 85 with “NET USE” command for the simple reason that the remote server’s protection mechanism is involved

2. Solutions
There are two solutions, one is to modify the registry of the remote server, and the other is to operate directly locally
1. Modify remote server registry
Change the value of this path in the registry from 1 to 0


For the terminal Server of Window Server 2003, the situation is quite special. Refer to the problem of 935642
2. Modify the native script
In fact, it’s easier to just delete all the disk mappings on your machine, rather than just deleting the definition, and click on the reference method

:: Delete all set disk mappings
net use * /delete /y

Error code:10053

Action.c(16): Error : socket0 – Software caused connection abort. Error code : 10053.


normal C/S communication process is :
Server Listen–>

Server Listen–> Client Connect–> Server Accept –> Client Send –> Server Recv–> Client Close –> Server Close
if you do not take the initiative to Close the connection and direct to withdraw from the Client end, Server end service thread will cause a 10053 error (this kind of error usually effect is not too big), and if in the process of the communication Server first initiative to Close the connection, the Client end can also cause a 10053 error

the situation of the bad network is usually refers to the latter, the Client thought the Server off (the actual network broken), so I cried. “10053

Recently, when I used LoadRunner to conduct the performance test of Winsock protocol, the WebServer tested was JBoss, and 10053 errors often occurred. The phenomenon was as follows: after I created the connection with lrs_create_socket, when the number of requests for this socket connection reached 100, the connection was not available, and it had to be closed before creating again. LoadRunner causes Connection abort. Error code: 10053. LoadRunner causes Connection abort.
After much exploration, it was finally found that the error was due to the configuration of the HTTP 1.1 KeepAlive parameter in Apach HTTPServer. From my test results of several different Webservers, it can be seen that JBoss and Tomcat made errors when a Socket connection made 100 requests, while other Web servers, such as IIS and WebLogic, did not have this problem.
several related parameters are described below: KeepAlive, KeepAliveTimeout, and MaxKeepAliveRequests.
KeepAlive Directive
Description: Enables HTTP persistent connections
Syntax: KeepAlive On|Off
Default: KeepAlive On
Context: server config, virtual host
Status: The Core
Module: the Core
In HTTP 1.0, a connection can only transfer one HTTP request, while the KeepAlive parameter is used to support the one connection, multiple transfers feature of HTTP 1.1, so that multiple HTTP requests can be passed in one connection. Although only newer browsers support this feature, this option is enabled anyway.
The keep-alive extension to HTTP/1.0 and The Persistent Connection feature of HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be sent over The same TCP Connection.In some The Keep Alive Extension to HTTP/1.0 and The Persistent Connection feature of 1.1 provide long-lived HTTP sessions which allow multiple requests to be sent over The same TCP Connection.In some cases this has been shown to result in an almost 50% speedup in latency times for HTML documents with many images. To enable Keep-Alive connections, set KeepAlive On.
For HTTP/1.0 clients, keep-alive Connections will only be used if they are specifically required by a client. In addition, A keep-alive connection with an HTTP/1.0 client can only be used when the length of the content is known in advance. This implies that dynamic content such as CGI output, SSI Pages, And server-generated Directory listings will generally not use keep-alive Connections to HTTP/1.0 clients.for HTTP/1.1 clients, persistent connections are the default unless otherwise specified. If the client requests it, chunked encoding will be used in order to send content of unknown length over persistent connections.
— — — — — — — — — — — — — — — — — — — — — —
KeepAliveTimeout Directive
Description: Amount of time the server will wait for subsequent requests on a persistent connection
Syntax: KeepAliveTimeout
Default: KeepAliveTimeout 15
Context: server config, virtual host
Status: Core
Module: Core
KeepAliveTimeout tests the time between multiple request transfers in a single connection. If the server has completed one request but has not received the next request from the client, the server disconnects after the interval exceeds the value set by this parameter.
The number of seconds Apache will wait for a subsequent request before closing the connection. Once a request has been received, the timeout value specified by the Timeout directive applies.
Setting KeepAliveTimeout to a high value may cause performance problems in heavily loaded servers. The higher the timeout, the more server processes will be kept occupied waiting on connections with idle clients.
— — — — — — — — — — — — — — — — — — — — — —
MaxKeepAliveRequests Directive
Description: Number of requests allowed on a persistent connection
Syntax: MaxKeepAliveRequests Number
Default: MaxKeepAliveRequests 100
Context: Virtual host
Status: Core
Module: Core
MaxKeepAliveRequests is the maximum number of HTTP requests that can be made with a single connection. Setting its value to 0 will support an unlimited number of transfer requests within a single connection. In fact, no client requests too many pages in a single connection, and usually the connection is completed before this limit is reached.
The MaxKeepAliveRequests directive limits the number of requests allowed per connection when KeepAlive is on. If it is set to 0, unlimited requests will be allowed. We recommend that this setting be kept to a high value for maximum server performance.
For example:MaxKeepAliveRequests 500
Finally, although this problem was caused by the parameter configuration of HTTPServer, only LoadRunner would have had this problem, and if Rational Robot had implemented the same functionality, it would not have had this problem, presumably due to the testing tool’s implementation strategy for Socket connections.