{"id":662,"date":"2008-06-22T21:55:28","date_gmt":"2008-06-22T12:55:28","guid":{"rendered":"http:\/\/www.kazu.tv\/blog\/?p=662"},"modified":"2008-06-22T21:55:28","modified_gmt":"2008-06-22T12:55:28","slug":"httpunit","status":"publish","type":"post","link":"https:\/\/kazu.tv\/blog\/2008\/06\/22\/httpunit\/","title":{"rendered":"HttpUnit\u3067\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306e\u30c6\u30b9\u30c8"},"content":{"rendered":"<p>\u73fe\u5728\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u3092\u5f90\u3005\u306b\u5c0e\u5165\u4e2d\u3002\u4eca\u307e\u3067\u793e\u5185\u306b\u306f\u3061\u3083\u3093\u3068\u3057\u305f\u30c6\u30b9\u30c8\u306e\u624b\u9806\u3068\u304b\u7121\u304b\u3063\u305f\u3093\u3060\u3051\u3069\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3082\u5f90\u3005\u306b\u5927\u304d\u304f\u306a\u3063\u3066\u304d\u305f\u306e\u3068\u3001\u6642\u9593\u7684\u306b\u82e5\u5e72\u4f59\u88d5\u304c\u51fa\u3066\u304d\u305f\u306e\u3067\u8272\u3005\u6574\u5099\u4e2d\u3002<br \/>\n\u3055\u3066\u3001\u901a\u5e38\u306eJava\u30af\u30e9\u30b9\u306fJUnit\u3067\u30c6\u30b9\u30c8\u3059\u308c\u3070\u3044\u3044\u3051\u3069\u3001\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3068\u304b\u306f\uff1f\u3063\u3066\u4e8b\u3067\u3001HttpUnit\u3092\u4f7f\u3046\u4e8b\u306b\u3057\u305f\u3002Cactus\u3082\u691c\u8a0e\u3057\u305f\u3051\u3069\u3002<br \/>\n\u3068\u308a\u3042\u3048\u305a\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3068\u304b\u898b\u3066\u666e\u901a\u306e\u30c6\u30b9\u30c8\u306f\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3093\u3060\u3051\u3069\u3001\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u6271\u3046\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u30c6\u30b9\u30c8\u3067\u3061\u3087\u3063\u3068\u30cf\u30de\u3063\u305f\u3002<\/p>\n<p><!--more--><br \/>\n\u307e\u305a1\u70b9\u76ee\u3002<br \/>\n<a href=\"http:\/\/www.httpunit.org\/doc\/api\/com\/meterware\/httpunit\/PostMethodWebRequest.html\" target=\"_blank\">PostMethodWebRequest<\/a>\u306eselectFile\u30e1\u30bd\u30c3\u30c9\u3067\u30a8\u30df\u30e5\u30ec\u30fc\u30c8\u3067\u304d\u308b\u307f\u305f\u3044\u306a\u3093\u3060\u3051\u3069\u3001IllegalNonFileParameterException\u304c\u767a\u751f\u3059\u308b\u3002<br \/>\n\u89e3\u6c7a\u65b9\u6cd5\u306fPostMethodWebRequest\u3092\u751f\u6210\u3059\u308b\u969b\u306b\u4ee5\u4e0b\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u4f7f\u7528\u3057\u3066\u7b2c\u4e8c\u5f15\u6570\u3092true\u306b\u3059\u308b\u3002<\/p>\n<div class=\"code\">new PostMethodWebRequest(&#8220;http:\/\/localhost\/servlet&#8221;, true)<\/div>\n<p>2\u70b9\u76ee\u3002\u3088\u304f\u3042\u308b\u30b1\u30fc\u30b9\u3068\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u7528\u306e\u30dc\u30c3\u30af\u30b9\u304c\u3042\u3063\u3066\u3001\u305d\u306e\u9805\u76ee\u304c\u5fc5\u9808\u3058\u3083\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u3068\u601d\u3046\u3002Yahoo\u30e1\u30fc\u30eb\u306e\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\u306e\u30da\u30fc\u30b8\u3068\u304b\u3001\u30dc\u30c3\u30af\u30b9\u304c5\u500b\u6709\u308b\u3051\u3069\u3001\u5225\u306b\u5fc5\u305a5\u500b\u540c\u6642\u306b\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u5fc5\u8981\u306f\u306a\u3044\uff08\u5f53\u7136\uff09\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u5165\u529b\u7528\u306e\u30dc\u30c3\u30af\u30b9\u304c\u3042\u3063\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u306a\u3044\u5834\u5408\u306e\u30c6\u30b9\u30c8\u3092\u3057\u305f\u3044\u3002<br \/>\n&lt;input type=&#8221;file&#8221; name=&#8221;file1&#8243; \/&gt;<br \/>\n\u4ee5\u4e0b\u306f\u3069\u308c\u3082\u4f8b\u5916\u304c\u767a\u751f\u3057\u3066NG<\/p>\n<div class=\"code\">webRequest.selectFile(&#8220;file1&#8221;, null);<br \/>\nwebRequest.selectFile(&#8220;file1&#8221;, new File(&#8220;&#8221;));<\/div>\n<p>selectFile\u3092\u547c\u3070\u306a\u3044\u3068\u3001\u305d\u308c\u306f\u4e0a\u8a18\u30d5\u30a9\u30fc\u30e0\u304c\u30da\u30fc\u30b8\u4e0a\u306b\u5b58\u5728\u3057\u306a\u3044\u72b6\u614b\u3092\u30a8\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3066\u3044\u308b\u4e8b\u306b\u306a\u308a\u3001\u3084\u308a\u305f\u3044\u30c6\u30b9\u30c8\u3068\u306f\u9055\u3046\u3002\u7d50\u5c40ML\u3067\u89e3\u6c7a\u65b9\u6cd5\u3092\u898b\u3064\u3051\u305f\uff08<a href=\"http:\/\/sourceforge.net\/mailarchive\/message.php?msg_id=44385C3F.4010307%40minimum.se\" target=\"_blank\">\u30da\u30fc\u30b8<\/a>\u672b\u5c3e\u306e\u30b3\u30fc\u30c9\u53c2\u7167\uff09\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HttpUnit\u3067\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u6271\u3046\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306e\u30c6\u30b9\u30c8\u3002\u57fa\u672c\u7684\u306a\u3084\u308a\u65b9\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u7a7a\u3060\u3063\u305f\u5834\u5408\u306e\u30c6\u30b9\u30c8\u306e\u3084\u308a\u65b9\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[60],"tags":[236,237,238],"class_list":["post-662","post","type-post","status-publish","format-standard","hentry","category-java","tag-httpunit","tag-237","tag-238"],"_links":{"self":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts\/662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/comments?post=662"}],"version-history":[{"count":0,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts\/662\/revisions"}],"wp:attachment":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/media?parent=662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/categories?post=662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/tags?post=662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}