??????????????????????????

view source
print?
1 // file: /path/to/test/dir/test1.js
2
3 casper.test.comment('My first test file');
4 casper.test.assert(true?? "true is so true");
5 casper.test.done(); // I must be called!

?????????????

view source
print?
01 // file: /path/to/test/dir/test2.js
02
03 casper.test.comment('This is my second test file?? a bit more async');
04
05 casper.start('http://my.location.tld/'?? function() {
06     this.test.assertNot(false?? "false is so false");
07 });
08
09 casper.run(function() {
10     this.test.done(); // I must be called once all the async stuff has been executed
11 });

????????? Casper ??????洢???????? casper ?????У???????????????????ü??ɡ?

????casperjs test ?????????????????μ????в????????

????view source

????print?

????$ casperjs test /path/to/test/dir/

?????????????????????????

????????????????????????????????????

????view source

????print

????$ casperjs test /path/to/test/dir/test1.js

????casper test ?????????????Щ??????

????--xunit=<filename> ???????????????? xUnit XML ??????

????--direct ???????????????????

????--log-level=<logLevel> ??????????? (?? related section)

??????? Casper

????$ casper test [path] ??????????$ casper /path/to/casperjs/tests/run.js [path] ????????????з??????????????????????????????????????????????? run.js ????????