Construction YUI Test from source

Forgive me for a time not too fond of the "Compile" in the front end, so the use of the "building."

Download YUI Test source code

Cloned into the local github

git clone https://github.com/yui/yuitest.git

Construct

//此时已经在yuitest的根目录中了
cd javascript
ant all

This process requires the use of an ancient building tool ant, apache ant to download to own it.

Run the above command, and can not really build YUI Test object files. Here to say next, doing things right really that difficult? YUI Test team since the code on github, at least if you can build it yourself. Hey, tears are all that much, anyway, people have long declared not maintained! That is, I used to play!
The reason is to build unsuccessful, it relies builder, then the library clones down enough to ensure the builder directory with the same level of yuitest!

git clone https://github.com/yui/builder.git

Run ant all again, all buttoned up.

Written in the last

I met YUI Test when watching "Test-Driven JavaScript Development", which it used as the seed file seed.js YUI offer, and is directly referenced in cdn, but also very dependent on the other YUI components, and so I want to own directly to the YUI test code into native to build unit tests!

This is not to say used alone YUI Test, but integrated into YUI Test YUI in while using the test-console, with test-console to show the results of the test. The YUI Test itself does not provide this visual display function test results, which itself is just a test framework, can only help you to test, to show the test results are required to write their own code! At the same time I found a big difference, in a separate YUITest some of the object's name in the whole YUI to renamed. So still have to use a little attention. such as:

YUITest in YUI in
YUITest.TestRunner Y.Test.Runner
YUITest.TestCase Y.Test.Case

Nothing else to operate what I just read in this book, the final estimate I turned around to other testing frameworks, such Resign brother wrote QUnit, or as before I do not mind be able to use actual TDD in the past is there, God knows!

发布了54 篇原创文章 · 获赞 39 · 访问量 8万+

Guess you like

Origin blog.csdn.net/Chinese521/article/details/78061295