[译]另一个网络测试人员
By robot-v1.0
本文链接 https://www.kyfws.com/applications/another-webtester-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 3 分钟阅读 - 1024 个词 阅读量 0[译]另一个网络测试人员
原文地址:https://www.codeproject.com/Articles/4860/Another-webtester
原文作者:jan larsen
译文由本站 robot-v1.0 翻译
前言
A stress tester for web apps
Web应用程序压力测试仪
介绍(Introduction)
不要被骗!如果您确实需要测试工具,请不要使用荒谬的实现,而要看一下(Don’t get cheated! If you really need a test tool, then do not use the ridiculous implementation, rather take a look at this) 信息(message) ,其中Daniel Turini指出了许多更好的免费工具.(, where Daniel Turini points to a lot of better free tools.)
不过,本文将保留在这里,直到发布了更好的实现,但是不要指望我来组装它:-)(This article will stay here though, untill a better implementation is posted, don’t expect me to assemble it though :-))
这是为测试网上商店而开发的压力测试仪,它将通过URL列表进行工作,并发送请求. (可选)它将测试响应的字符串值.该应用程序是为了提高速度,开发时间以及性能而开发的,因此缺乏用户友好性,但是,嘿,无论如何都想成为用户的朋友.(This is a stress tester developed for testing a webshop, it will work its way through a list of URLs, and send a request. Optionally it will test the response for a string value. The app was developed for speed, in development hours as well as performance, so it lacks a lot in user friendliness, but, hey, who wants to befriend users anyway.)
用法(Usage)
Here is how to set up the list, it is important to avoid empty lines:
# The name of the server
http://www.google.com/
# Number of repetitions of the whole sequence
10
# The following should be a list of pairs of an URL and
# a string to find in the response.
# An URL
somefolder/foo.asp?bar=foobar
# Something to find in the response
<html>
# An URL 2
somefolder/foo.asp?bar=foobar
# Something to find in the response 2
<html>
运行时,它将一些日志信息放入此文件中:(When running it will put some log info into this file:)C:\ webtestlog.txt(C:\webtestlog.txt),因此最好使用C驱动器.就像我说的那样,这是一个非常原始的工具,因此,除了一些可读的日志文本之外,还抛出了一些二进制值,因此,如果在文件的开头看到一些奇怪的内容,请不要害怕.(, so you better have a C drive. As I said, this is a very primitive tool, so besides some readable log text, there is also some binary values thrown in, so don’t get scared if you see sometnig weird in the start of the file.)
日志的可读部分如下所示:(Here is what the, readable part, of the log looks like:)
Num Requests = 242
Ms. Pr. Request = 21141
Num error requests = 0
Num error responses = 0
首先是执行的请求数,其次是每个请求使用的平均毫秒数.下一个值是失败的请求数,其后是不包含所需响应字符串的响应数.(First there is the number of requests performed, next is the average millisecs used per request. The next value is the number of requests that failed, and after that follows the number of responses that didn’t contain the wanted response string.)
添加了纯C语言中的源代码,因此您可以自行更改应用程序.(The sourcecode in plain C is added, so any changes to the app is possible, if you do it yourself.)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
C++ C VC6 WinXP Win2003 Windows Win2K Visual-Studio Dev 新闻 翻译