诸暨麻将添加redis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

80 lines
1.4 KiB

  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP FORMPOST
  6. config file
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 200 OK swsclose
  13. Date: Thu, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. Content-Length: 11
  16. blablabla
  17. </data>
  18. </reply>
  19. # Client-side
  20. <client>
  21. <server>
  22. http
  23. </server>
  24. <name>
  25. HTTP and -F upload in config file
  26. </name>
  27. <stdin>
  28. -F name=daniel
  29. -F tool=curl
  30. -F file=@log/test71.txt
  31. </stdin>
  32. <command>
  33. http://%HOSTIP:%HTTPPORT/we/want/71 -K -
  34. </command>
  35. # We create this file before the command is invoked!
  36. <file name="log/test71.txt">
  37. foo-
  38. This is a moo-
  39. bar
  40. </file>
  41. </client>
  42. # Verify data after the test has been "shot"
  43. <verify>
  44. <strip>
  45. ^(User-Agent:|Content-Type: multipart/form-data;|------------).*
  46. </strip>
  47. <protocol>
  48. POST /we/want/71 HTTP/1.1
  49. User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  50. Host: %HOSTIP:%HTTPPORT
  51. Accept: */*
  52. Content-Length: 408
  53. Expect: 100-continue
  54. Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
  55. ------------------------------9ef8d6205763
  56. Content-Disposition: form-data; name="name"
  57. daniel
  58. ------------------------------9ef8d6205763
  59. Content-Disposition: form-data; name="tool"
  60. curl
  61. ------------------------------9ef8d6205763
  62. Content-Disposition: form-data; name="file"; filename="test71.txt"
  63. Content-Type: text/plain
  64. foo-
  65. This is a moo-
  66. bar
  67. ------------------------------9ef8d6205763--
  68. </protocol>
  69. </verify>
  70. </testcase>