About JSMock is a fully featured Mock Object library for JavaScript that provides the necessary tools to do effective interactive based testing. JSMock provides expectation recording and matching, and has the ability to return, throw, and stub on object method calls. The interface is simple and easy to use, which makes testing easy. Compatibility JSMock has been tested with: Internet Explorer 6.0
I don't know how to unit-test the main method! Obviously you have no imagination. You test the same method the same way you test static methods: provide known input, and test that the output is what you expect given the input. Which is exactly the same way you'd test Math.abs() and numerous other static methods. (Which is exactly the way I test C# extension methods, e.g. http://anonsvn.mono-projec
YUI Test is a testing framework for browser-based JavaScript solutions. Using YUI Test, you can easily add unit testing to your JavaScript solutions. While not a direct port from any specific xUnit framework, YUI Test does derive some characteristics from nUnit and JUnit. YUI Test features: Rapid creation of test cases through simple syntax. Advanced failure detection for methods that throw error
The JavaScript team maintains a library of tests that are based on the ECMA-262 standard for web scripting languages and other documentation for JavaScript. If you find a bug in the core JavaScript engine, you can now contribute a test to our library. Your tests will be used to reproduce bugs, verify bug fixes, prevent regressions, and improve the stability of the JavaScript engine. If you are con
http://martinfowler.com/bliki/TestDouble.html Gerard Meszarosããæ§ã ãªXunitãã¬ã¼ã ã¯ã¼ã¯ã使ç¨ãããã¿ã¼ã³ãéããæ¸ç±ãå·çä¸ã§ããã å½¼ã¯ãããåä»ãªãã¨ã«åºãããã¦ããã ã·ã¹ãã ã®ä¸é¨åããã¹ãããããã«ã¹ã¿ãåãããã¨ããããã ãã®ååã¨ããã®ããã¹ã¿ããã¢ãã¯ããã§ã¤ã¯ãããã¼ãªã©ãè²ã ã¨ããã®ã ã ãã®ããå½¼ã¯ãèªèº«ã®ç¨èªéã使ããã ãã®ç¨èªéã¯åºãæ®åãã¹ããã®ã ããã å½¼ãä¸è¬çãªç¨èªã¨ãã¦ä½¿ã£ã¦ããã®ã¯ããTest Doubleï¼ãã¹ã代役ï¼ãã¨ããè¨èã ï¼ã¹ã¿ã³ãã®ä»£å½¹(double)ãæ³åãã¦ã»ããï¼ã Test Doubleã¯ããã¹ãç¨ã«ãªãã¸ã§ã¯ããå ¥ãæ¿ããã¨ãã«ä¸è¬çã«ç¨ããããè¨èã§ããã Gerardã使ãããªã¹ãã«ã¯ãæ§ã ãªDoubleãè¼ã£ã¦ããã ããã¼ãªãã¸ã§ã¯ãã¯ãåãæ¸¡
TEST http://d.hatena.ne.jp/devbankh/201001ãã¢ãã¯ãã¹ã¿ãã使ã£ãå¹ççãªã¦ããããã¹ã http://d.hatena.ne.jp/devbankh/201002ãã¢ãã¯ã¨ã¹ã¿ãã®éã ã³ãã¥ãã±ã¼ã·ã§ã³ http://d.hatena.ne.jp/devbankh/20051124ãç°¡åãã¤å¹æçã«è©±ãããã« "ã¢ãã¯ãªãã¸ã§ã¯ã"ã¨ããè¨èã¯ããã¹ãã®ããã«æ¬ç©ã®ãªãã¸ã§ã¯ããã¾ããç¹æ®ãªãªãã¸ã§ã¯ãã表ãè¨èã¨ãã¦å®çããããããã¢ãã¯ã¨ããè¨èã¯å ã ã¹ã¿ãããã£ããã¼ã«ãããã®ã§ãªãã[ã¹ã¿ãã使ã£ãã®ã¨ã¯å¥ã®] ã¦ããããã¹ãæ¹æ³ãç¨ããããã®ãã®ãªã®ã ããã®è¨äºã§ã¯ãã¢ãã¯ãªãã¸ã§ã¯ãã®ãã¡ã³ã«å¥½ã¾ããç¸äºä½ç¨ä¸å¿ã®ãã¹ãã¨ãããè¡ãã¦ããç¶æ ä¸å¿ã®ãã¹ãã¹ã¿ã¤ã«ã¨ã®éãã説æããããã«ãã¢ãã¯ã¨ã¹ã¿ãã®éãã«ã¤ãã¦æãä¸ããã ç®æ¬¡
Selenium on Rails: Overview Selenium on Rails provides an easy way to test Rails application with SeleniumCore. This plugin does four things: The Selenium Core files donât have to pollute /public. No need to create suite files, they are generated on the fly â one suite per directory in /test/selenium (suites can be nested). Instead of writing the test cases in HTML you can use a number of better
å質åä¸ã®ããã«ãRuby ã®ãã¹ãææ³ãåå¼·ãã¦ãã¾ãã çè§£ãæ·±ããããã«ããã°ãæ¸ãã¡ã½ããã 以ä¸ã§ã¯ãRuby ã®ã¦ããããã¹ããè¡ãã¯ã©ã¹ Test::Unit ãå©ç¨ãããã¹ãææ³ã«ã¤ãã¦èª¬æãã¾ãããã¹ããããã¯ã©ã¹ãè¨å®ç°¡åãªãã¹ãã®ä¾ãè¦ã¦ã¿ã¾ããã¾ãããã¹ã対象ã®ã¯ã©ã¹ãè¨å®ãã¾ããclass Foo def foo return 'foo' end def bar return 'bar' end endãã¹ãã³ã¼ããæ¸ãæ¬¡ã«ä¸è¨ã®ã¯ã©ã¹ã®ã¡ã½ããããã¹ãããã¯ã©ã¹ã以ä¸ã®ããã«æ¸ãã¾ããrequire 'test/unit' class FooTest < Test::Unit::TestCase # åãã¹ãã¡ã½ãããå¼ã°ããåã«å¼ã°ããã¡ã½ãã def setup puts 'æ°ãããã¹ããéå§ãã¾ãã' @obj = Foo.new end # åãã¹ãã¡ã½
Test::Unit ãæ¨æºã ã¨æã£ã¦ããããã¾ãã RSpec ãªããã®ãããã¨ã¯ãã ã¨ãããã¨ã§ãRSpec ã«ã¤ãã¦å¦ç¿ãã¦ãã¾ãã åèãµã¤ã: ã¹ã¯ã¹ããã¯ã®ã¹ ã第 1 åã RSpec ã®æ¦è¦ã¨ãRSpec on Rails (ã¢ãã«ç·¨) RSpec -1.0.8RSpecã¨ã¯??RSpec 㯠Ruby ã§æ¸ãããã³ã¼ãã®æ¯èããå®è¡å¯è½ãªå½¢å¼ã§è¨è¿°ãããã¡ã¤ã³ç¹åè¨èª (Domain Specific Language: DSL) ãæä¾ãããã¬ã¼ã ã¯ã¼ã¯ã§ãã RSpec ã«ãããææ³ã«ã¤ãã¦ã¯ä¸è¨åèãµã¤ãã«æ¸ãã¦ããã¾ãã®ã§ãã¡ããåèã«ãã¦ãããã¨ãã¦ãå®éã«ãã¹ãã³ã¼ããæ¸ãã¦ã¿ã¾ãã ã¤ã³ã¹ãã¼ã«gem çµç±ã§ã¤ã³ã¹ãã¼ã«ã§ãã¾ãã# gem install rpsecRSpec ã®åºæ¬ã³ãã³ãã¯ãspec ã§ãã以ä¸ã®ã³ãã³ãã§ RSpec ã®ãã¼ã¸ã§ã³#
ãç¥ãã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}