For android all stars in shibuya.
For android all stars in shibuya.
ã¦ããããã¹ããè¡ãã¨ãã«å°ãã®ã HttpServletRequestçã®ãµã¼ããªã©ã§çæãããã¤ã³ã¹ã¿ã³ã¹ã å¼æ°ã¨ãã¦ããã¡ã½ããã®ãã¹ãã§ãã ãããªã¨ãã¯ã¢ãã¯ã¨ããæ¬ä¼¼ãªãã¸ã§ã¯ãã å©ç¨ãããã¹ããè¡ãã®ãä¸è¬çã§ãã ç§ãJUnitã§ãã¹ããè¡ãçºã«ã¢ãã¯ã å©ç¨ãããã¨æã£ãã®ã§ããã æå©ç¨ãã¦ããmockobjectã¨ããã©ã¤ãã©ãªãç¡ããªã£ã¦ãã¾ãããï¼å¹´ãæãã¾ã;_;ï¼ ä»ã¯EasyMockãjMockã¨ãã£ãã©ã¤ãã©ãªãå©ç¨ããã¦ããããã§ãã ã¨ãããã¨ã§ä»åãEasyMockãåãã¦ä½¿ã£ã¦ã¿ã¾ããã以ä¸ã使ãæ¹ã§ãã http://www.easymock.org/index.html ï¼ãã¼ã¸ã§ã³ã¯2.4ã使ç¨ï¼ ã¾ãæåã«ãã¦ã³ãã¼ãããã easymock.jarãã¯ã©ã¹ãã¹ã«éãã¾ãã 次ã«ã import static org.easymock.
ãã¸ãã¯ãã¹ã iOSã·ãã¥ã¬ã¼ã¿SDKããã¼ã¹ã ããiPhoneã·ãã¥ã¬ã¼ã¿ã¦ãã¯å®è¡ããªã ãã¹ã対象ã®ã³ã¼ããã¯å¯¾å¿ããã¿ã¼ã±ãããã®ããã«ãããã§ã¼ã¹ãã®éã«å®è¡ å®æ©ã§ã¯åãããªã(ããã¾ã§æåãéãã±ã¼ã¹ããªãã®ã§ãã¾ãå°ããªããããããªããã©) faaasssttttt!! ä¾ ) OCUnit(SenTestingKit)ã Kiwi
Stack Overflowã®TDD Anti-patterns catalogueã¨ããã¹ã¬ãã¨ã¦ãé¢ç½ãã£ãã®ã§è¨³ãã¦ã¿ãã Stack Overflowã®votingæ©è½ã§ã¢ã³ããã¿ã¼ã³ã¸ã®æ票ãè¡ã£ã¦ããæãã ä¸ããæ票ã®å¤ãé ã«ãªã£ã¦ããã å¾ç¥¨æ°ã¯ãã®è¨äºå·çæç¹(2013.7.9)ã®ãã®ã SQLã¢ã³ããã¿ã¼ã³ã£ã½ãããã¿ã¼ã³åã¯ãã®ã¾ã¾çä»®åã«ãã¦ã¿ãã ã¾ããå 容ãããªã被ã£ã¦ããã¨ããç¶æ³ãããªãã¬ã¢ãããªããã¨æããã®ã¯ãä¸é¨çç¥ãã¾ããã (ãã³ã¡ã§è¨³ééã£ã¦ãããã£ã¦æãã¦ããã£ãã®ã§ãä¸é¨ä¿®æ£ãã¾ãã 2013.7.10) ããªã¼ã©ã¤ã (ãã¹ãã®ãã ä¹ã) 50pt æ°ãããã¹ãã±ã¼ã¹ãæ¸ãã®ã§ã¯ãªããä»ã®æ©è½ã®ãã¹ãã«æ°ããã¢ãµã¼ã·ã§ã³ã追å ãã¦æ¢åã®ãã¹ãã±ã¼ã¹ã«ä¹ã£ããã ã»ã«ã³ãã¯ã©ã¹ ã·ãã£ãºã³ (äºçå¸æ°) 47pt ãããã¯ã·ã§ã³ã³ã¼ãã®ããã«
Jenkinsã§ãã¹ãã®èªååã試ã¿ã¦ããããã§ããããªãããã¾ããããªãã ããããæºåã®é åºãæªãã£ãã ãããªããªã¢ã¼ãç°å¢ã§Jenkinsãåãããã¨ãã ãã¼ã«ã«ç°å¢ã§Antã使ã£ã¦ãã¹ãã®å®è¡ããããã¨ããªãã®ã«ãããã¨ãã æé ãæåã§ç¢ºèªããåã«ãããã®æ å ±ãéµåã¿ã«ãã¦ãããã¨ãã¦ãã é¢åèãã£ã¦ããã®ãé常ã«ãããªãã æåã§ã§ããªããã¨ã¯èªååã§ããããããªãã åºæ¬ã«ç«ã¡è¿ã£ã¦ãå½±é¿ç¯å²ã®ã¹ã³ã¼ããçãã¦ãå¾ã ã«èªååãã¦ãããã¨æãã¾ãããããã§ãã¾ãã¯Antã使ã£ã¦ã¢ããªã®ãã«ãã¨ãã¹ããè¡ãªãããã«ãããã¨æãã¾ãã ã¾ã対象ããã¸ã§ã¯ããantã§ãã«ãããããã®build.xmlã®ä½æãè¡ãªãã¾ãã HelloAndroidããã¸ã§ã¯ãã®ãã£ã¬ã¯ããªã«ããã¨ãã¾ãã android update project -p . 次ã«ã対象ã®ãã¹ãããã¸ã§ã¯ããa
Express3.x(connect2.3+)ã¨Socket.IOã§ã®ã»ãã·ã§ã³ç®¡çã¨mochaã¨superagentã§expressã使ã£ããµã¼ãã¹ã®ãã°ã¤ã³å¨ãã®ãã¹ãã®ç¶ãã ä»åã¯socket.ioã®åææ¥ç¶ã®ãã¹ãã«ã¤ãã¦ãä»å㯠1000人åææ¥ç¶ãåºæ¥ãã æ£ããã¡ãã»ã¼ã¸ã®ããã¨ããåºæ¥ãã(ãã£ãããªã®ã§) ãã°ã¤ã³æ¸ã¿ã¦ã¼ã¶ã¼ã®ã¿ãæ¥ç¶ã§ããã ã®ãã¹ããè¡ãªã£ã¦ã¿ã¾ããã socket.io-clientãç¨ããã°ãã³ã³ã½ã¼ã«ããåææ¥ç¶ã®ãã¹ããç°¡åã«åºæ¥ã¾ãã ãã ããç°å¢ã«ãã£ã¦ã¯OSèªä½ã®ãã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ã®æ大æ°ãå¼ãä¸ããªãã¨1000人åææ¥ç¶ã¯é£ããã§ãã ã½ã¼ã¹ã³ã¼ã ä»åã¯ä»ã¾ã§ã®ãå ¨ã¦å«ãããã®ãgithubã«ä¸ãã¦ãã¾ãã pxsta / express-socket.io-chat-test ä»åã®ç°å¢ Mac OSX 10.7.4 Lio
ä»ã¾ã§mochaã§ã®ãã¹ããMakefileã«æ¸ãã¦å®è¡ãã¦ããã®ã§ããã npmããå®è¡ã§ããã¨ããã®ãç¥ã£ãã®ã§ããã試ãã¦ã¿ãã¡ã¢ã§ãã ç°å¢ï¼MacOS 10.7.3 / nodebrew 0.5.0 / node.js 0.6.12 / npm 1.1.9 Makefileæ代 .PHONY: test test: ./node_modules/.bin/mocha \ --colors \ --reporter spec \ --ui tddãªãã¦æ¸ãã¦ã $ make test ã¨ãããµãã«å®è¡ãã¦ã¾ããã Makeã¯å¥½ãã§ããããããããªã¨ããã§ä½¿ã£ã¦ããã§ãã npmã§ãã§ãããªãä»ã®ãã®ã«ä¾åããªãæ¹ãããããªã¼ã¨ã npmæ代 package.jsonã« { ï¼ç¥ï¼ "scripts": { "test": "./node_modules/.bin/mocha" }
Androidãã¹ãé¨ ç¬¬äºåãã¼ãã£ã³ã°ã§ã Robolectric ã¨ãããè¬ã®ç©ä½ã®åå¨ãæãã¦ããã£ãã®ã§ãã£ã¦ã¿ãã @thorikawa ãããããããï¼ Robolectric ã£ã¦ï¼ http://pivotal.github.com/robolectric/index.html ç°¡åã«è¨ãã¨ãPCä¸ã§Androidã®ä¸é¨UnitTestã§å®è¡ãã¡ããï¼ï¼ã£ã¦ãã¨ãããã appengineã¨ãã¯ãUnitTestããµã¼ãã¨ãèµ·åããå¿ è¦ãªãã¦ãç°¡åã«å®è¡ã§ããã®ã§ãTDDçãªæå³ã§éçºãµã¤ã¯ã«ã§ã¤ã£ãããã¨ãããå°ãªããé常ã«éçºããããã¨æãã¾ãï¼ï¼ ã§ããAndroidã®å ´åã¯ã¢ããªã®ãã«ããã¤ã³ã¹ãã¼ã«ããã¹ãã¢ããªã®ãã«ããã¤ã³ã¹ãã¼ã«ããã¹ãã®å®è¡ãã¨ãµã¤ã¯ã«ãè¸ããããããã¼æéããããã¾ãã1åãã¹ããããã®ã«ãå®æ©ä½¿ã£ã¦20ç§ãã¨ãã¥ã¬ã¼ã¿ã®èµ·åããããã¨
ãã¹ãå®è¡æã«ã¢ãã¯ã¨ãªã Web ãµã¼ããèµ·åãã¦ãæãéãã®ã¬ã¹ãã³ã¹ãè¿ãç°å¢ãä½ãã NLTHTTPStubServer ã¨ãããã¼ã«ããããããã使ãã°ãweb API ã®å®è¡ã®æåã»ä¸æåãªã©ã®ãã¹ãã楽ã«æ¸ããããã¹ãå®è¡æã«å©ã API ã® URL ãã¡ããã£ã¨æ¸ãæããã ããªã®ã§ããã¹ãã®ããã«ã³ã¼ããä¿®æ£ããé¨åã¯å°ãªãã ããããå®éã®ã¢ããªã±ã¼ã·ã§ã³ã®åä½ã¨ã»ã¼åãç¶æ ã§ãã¹ããã§ããã¯ãã ã NLTHTTPStubServer ã®å°å ¥ NLTHTTPStubServer ã¯ä»¥ä¸ã®ã©ã¤ãã©ãªã«ä¾åãã¦ããã®ã§ãããããããã¸ã§ã¯ãã«è¿½å ããã CocoaHTTPServer - https://github.com/robbiehanson/CocoaHTTPServer CocoaAsyncSocket - CocoaHTTPServer ã® Vendor ã«å ¥ã£ã¦
注æï¼ãAndroid Mockã«ã¤ãã¦ï¼2014å¹´6æ2æ¥è¿½è¨ï¼ æ¬è¨äºã§ç´¹ä»ãã¦ããAndroid Mockã¯ã2012å¹´11æã«éçºã»ãµãã¼ãã®çµäºã宣è¨ããã¾ãããããä¸è¬çãªä¸è¨ã¢ãã¯ãã¬ã¼ã ã¯ã¼ã¯ã®Dalvikä»®æ³ãã·ã³å¯¾å¿ãã»ã¼å®äºãã¦ããããã®å½¹ç®ãçµããããã§ãã Mockitoï¼1.9.5rc-1ã§Dalvik対å¿ããã¼ã¸ããã¾ãã EasyMockï¼3.2ã§Dalvik対å¿ããã¼ã¸ããã¾ãã æ°è¦ã«ä½æããããã¸ã§ã¯ãã§ã¯ããããä»ã®ã¢ãã¯ãã¬ã¼ã ã¯ã¼ã¯ã使ç¨ãããã¨ããå§ããã¾ããï¼ ITã§ã¯ãä»ã®ã¢ãã¯ãã¬ã¼ã ã¯ã¼ã¯å°å ¥æ¹æ³ãç´¹ä»ããè¨äºãæ²è¼äºå®ã§ãã ãªããæ¬è¨äºã®ãµã³ãã«ã³ã¼ããMockitoåãã«æ¸ãæãããã®ãå ¬éãã¦ãã¾ãã以ä¸ããåç §ãã ããã https://gist.github.com/4179494 ããã«ãEasyMockåãã«æ¸ãæãããã®
9. class CalculatorTest extends PHPUnit_Framework_TestCase { public function setUp() { $this->calc = new Calculator; } public function test_add_å¼æ°ã®åãè¿ã() { $result = $this->calc->add(1, 2); $this->assertSame(3, $result); } } 10. class CalculatorTest extends PHPUnit_Framework_TestCase { public function setUp() { 1 $this->calc = new Calculator; } public function test_add_å¼æ°ã®åãè¿ã() { $result = $this-
Androidã¢ããªéçºï¼ã«éã£ã話ã§ã¯ãªãã§ããï¼ã§TDDãããã¨æã£ãã¨ãã«ããã¹ã対象ã¯ã©ã¹ã®ãã£ã¼ã«ããã¢ãã¯ã§å·®ãæ¿ããããã¨æããã¨ããã°ãã°ããã¾ããä¾åããã¯ã©ã¹ã®æ¯ãèããåºå®åãããã¨ã§ããã¹ã対象ãªãã¸ã§ã¯ãã®æ¯ãèãã ãã«çç®ãããã¹ãã±ã¼ã¹ãæ¸ããã¨ãã§ããããã§ãã ãããªæã«ãDIã³ã³ããä¸ã§ã³ã¼ããæ¸ãã¦ããã¨ä¾¿å©ã§ãã以åãå°ãã ãSeasar2+EasyMockã§ãã¹ããæ¸ãã¦ãããã¨ããã£ãã®ã§ãããä½æããã¢ãã¯ãªãã¸ã§ã¯ãã®å·®ãæ¿ãããã»ã¼å ¨ã¦Seasar2ããã£ã¦ãããã®ã§ãã®ããã便å©ã§ããã Androidéçºã§ãSeasar2+EasyMockãããç°¡åã«ãã¹ããæ¸ãããï¼ ã¨ãããã¨ã§ã Android Mockã§ã¢ãã¯ãªãã¸ã§ã¯ãã¨ãã®æ¯ãèããå®ç¾© RoboGuiceã§ã¢ãã¯ãªãã¸ã§ã¯ãããã¹ã対象ã¯ã©ã¹ã«ã¤ã³ã¸ã§ã¯ã ã¨ãããã¨ãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}