Please indicate the source: http://blog.csdn.net/gaoxiangnumber1
Welcome to my github: https://github.com/gaoxiangnumber1
- webtest工作的第三步是输出测试参数,对应函数
void PrintConfigure(char **argv)
。根据用户输入的options输出对应的configuration,相当于给用户的提示。完整源码:
void PrintConfigure(char **argv) // Step 3. Print this test's configure information.
{
// Testing: <method> <url> <version>\n
// With <clients> <time> <force> <proxy> <reload>
printf("Testing: ");
switch(method)
{
default:
case METHOD_GET:
printf("GET");
break;
case METHOD_OPTIONS:
printf("OPTIONS");
break;
case METHOD_HEAD:
printf("HEAD");
break;
case METHOD_TRACE:
printf("TRACE");
break;
}
printf(" %s using HTTP/1.1\n", argv[optind]);
printf("With %d client(s), running %d second(s)", clients, test_time);
if(force)
{
printf(", early socket close");
}
if(proxy_host)
{
printf(", via proxy server %s:%d", proxy_host, proxy_port);
if(force_reload) // Only with proxy server, use reload is useful.
{
printf(", forcing reload");
}
}
printf(".\n");
}
Please indicate the source: http://blog.csdn.net/gaoxiangnumber1
Welcome to my github: https://github.com/gaoxiangnumber1