{"id":189144,"date":"2013-08-06T14:06:02","date_gmt":"2013-08-06T10:06:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=189144"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=189144","title":{"rendered":"<span class=\"post_title\">\u0417\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432 Siesta \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PhantomJS<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0417\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u044b Siesta \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u043b\u0430\u0442\u043d\u0443\u044e (\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e) \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u043e\u0438\u0442 499$). <\/p>\n<h5>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h5>\n<p>  \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f (\u043b\u0430\u0439\u0442) \u0432\u0435\u0440\u0441\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 <a href=\"http:\/\/www.bryntum.com\/products\/siesta\/\">Siesta<\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0410 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f CI \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u0437\u043e\u0440 \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u043a\u0443\u0441\u043d\u043e\u0441\u0442\u0435\u0439, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u0421\u0430\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a PhantomJS \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0432\u043e\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u0418\u0437\u0443\u0447\u0438\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e Phantom JS, Siesta \u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 Jasmine \u0438 QUnit, \u043c\u043d\u043e\u044e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u0441 \u0432\u0430\u043c\u0438 \u0434\u0435\u043d\u044c\u0433\u0438.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f<\/h5>\n<p>  \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <a href=\"http:\/\/www.bryntum.com\/products\/siesta\/\">Siesta<\/a> \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 <a href=\"http:\/\/www.sencha.com\/products\/extjs\/\">ExtJS<\/a>. \u042d\u0442\u043e \u043c\u043e\u0449\u043d\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f javascript-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a: ExtJS, jQuery, Dojo \u0438 \u0442.\u0434. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0435 \u0442\u0430\u043a \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435, \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0439 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<p>  \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <a href=\"http:\/\/phantomjs.org\/\">PhantomJS<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u0434\u0432\u0438\u0436\u043a\u0435 WebKit. \u041e\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0448\u0438\u0440\u043e\u043a\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0435 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 Siesta, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u00ab\u043a\u043e\u0442 \u043d\u0430\u043f\u043b\u0430\u043a\u0430\u043b\u00bb.<\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u043f\u0438\u0448\u0443 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0441\u0442.<\/p>\n<h5>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f<\/h5>\n<p>  <\/p>\n<ol>\n<li>\u0412\u044b \u0443\u0436\u0435 \u0443\u043c\u0435\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b Siesta \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 (\u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0432\u0430\u043c <a href=\"http:\/\/www.bryntum.com\/docs\/siesta\/#!\/guide\/siesta_getting_started-section-4\">\u0441\u044e\u0434\u0430<\/a>). \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0442\u0435\u0441\u0442\u044b \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>http:\/\/localhost\/tests\/index.html<\/code>  <\/li>\n<li>\u0423 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d PhantomJS (\u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e <a href=\"http:\/\/phantomjs.org\/download.html\">\u0441\u044e\u0434\u0430<\/a>)  <\/li>\n<\/ol>\n<h5>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043a\u043e\u0434<\/h5>\n<p>  \u041c\u043d\u043e\u044e \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441\u043a\u0440\u0438\u043f\u0442-\u0440\u0430\u043d\u0435\u0440 <a href=\"https:\/\/github.com\/suvorov\/run-siesta\">run-siesta.js<\/a> \u0434\u043b\u044f PhantomJS, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b Siesta.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 run-siesta.js<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">var start = new Date().getTime(), \tsystem = require('system'), \tpage = require('webpage').create();  console.log('\\nStart tests...\\n');  \/**  * \u041b\u043e\u0433.  *\/ var globalLog = (function() { \tvar store = [];  \treturn { \t\t\/** \t\t * \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043b\u043e\u0433. \t\t * \t\t * @param msg \t\t *\/ \t\tadd: function(msg) \t\t{ \t\t\tstore.push(msg); \t\t},  \t\t\/** \t\t * \u0412\u044b\u0432\u043e\u0434\u0438\u0442 \u043b\u043e\u0433\u0438 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \t\t *\/ \t\tconsole: function() \t\t{ \t\t\tvar log = '';  \t\t\tfor (var i= 0; i &lt; store.length; i++) \t\t\t{ \t\t\t\tlog += store[i] + '\\n'; \t\t\t}  \t\t\tconsole.log(log); \t\t} \t}; }());  if (system.args.length !== 2) { \tglobalLog.add('Usage: phantomjs run-siesta.js URL'); \tmyExit(1); }  \/**  * \u0417\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u043a\u043e\u0434.  *  * @param exitCode \u043a\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f (0 - \u041e\u041a)  *\/ function myExit(exitCode) { \tglobalLog.add('Total time: ' + (new Date().getTime() - start) + ' ms'); \tglobalLog.add('Exit code: ' + exitCode); \tglobalLog.console();  \tphantom.exit(exitCode); }  \/**  * \u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435.  * @param msg  *\/ page.onConsoleMessage = function(msg) { \tif (msg.match(\/END_TESTS\/)) \t{ \t\tvar exitCode = page.evaluate( \t\t\tfunction() \t\t\t{ \t\t\t\tvar totalPass = document.getElementsByClassName('total-pass')[0].innerText; \t\t\t\tvar totalFail = document.getElementsByClassName('total-fail')[0].innerText;  \t\t\t\tif (totalFail !== '0') \t\t\t\t{ \t\t\t\t\tconsole.log('\\nFailed!'); \t\t\t\t} \t\t\t\telse \t\t\t\t{ \t\t\t\t\tconsole.log('\\nCompleted!'); \t\t\t\t}  \t\t\t\tconsole.log('\\nTotal pass: ' + totalPass); \t\t\t\tconsole.log('Total fail: ' + totalFail);  \t\t\t\treturn totalFail === '0' ? 0 : 1; \t\t\t} \t\t);  \t\tmyExit(exitCode); \t} \telse if (!msg.match(\/\\[object Object\\]\/)) \t{ \t\tconsole.log(msg); \t} };  \/**  * \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.  * @param {String} URL \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b  *\/ page.open(system.args[1], \tfunction(status) \t{ \t\tif (status !== &quot;success&quot;) \t\t{ \t\t\tglobalLog.add(&quot;Unable to access network&quot;); \t\t\tmyExit(1); \t\t} \t} ); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 API PhantomJS \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b c \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043b\u043e\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 index.html.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435, index.html \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0441\u043a\u0440\u0438\u043f\u0442 index.js, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432. \u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"http:\/\/www.bryntum.com\/docs\/siesta\/#!\/guide\/siesta_getting_started-section-4\">index.js<\/a> \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 Siesta.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0442\u0435\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043e\u043f\u0446\u0438\u044e:<\/p>\n<p>  <code>autoRun: true<\/code><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 PhantomJS \u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435, \u0442\u0435\u0441\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0438 \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0442\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u043d\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0432\u044b\u0431\u0440\u0430\u0432 \u043e\u043f\u0446\u0438\u044e \u201cAuto launch\u201d.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b PhantomJS \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u043c \u0442\u0435\u0441\u0442\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 Siesta \u2014 <a href=\"http:\/\/www.bryntum.com\/docs\/siesta\/#%21\/api\/Siesta.Test-event-testfinalize\">testfinalize<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u043c \u0442\u0435\u0441\u0442\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 PhantomJS \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <b>page.onConsoleMessage<\/b>).<\/p>\n<p>  \u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0431\u044b\u0442\u0438\u044f <a href=\"http:\/\/www.bryntum.com\/docs\/siesta\/#!\/api\/Siesta.Harness-event-testsuiteend\">testsuiteend<\/a>. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u043d\u0430\u0435\u0442 PhantomJS. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0447\u0435\u043c\u0443 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0438 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0438\u0442\u043e\u0433\u043e\u0432\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">\t\tlisteners: \t\t{ \t\t\ttestfinalize: function(event, test) \t\t\t{ \t\t\t\tvar fail = test.$failCount, \t\t\t\t\tpass = test.$passCount;  \t\t\t\tvar log = (fail ? '~~~~~~~~\\n FAILED  ' : '[PASSED] ') + \t\t\t\t\ttest.url + ' [pass: ' + pass + ', fail: ' + fail + ']' + \t\t\t\t\t(fail ? '\\n~~~~~~~~' : '');  \t\t\t\tconsole.log(log); \t\t\t}, \t\t\ttestsuiteend: function(event, harness) \t\t\t{ \t\t\t\tconsole.log('END_TESTS'); \t\t\t} \t\t} <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043e\u0444. \u0441\u0430\u0439\u0442\u0430 Siesta, \u0442\u043e <a href=\"https:\/\/github.com\/suvorov\/run-siesta\">index.js<\/a> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 index.js<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">var Harness = Siesta.Harness.Browser.ExtJS;  Harness.configure({ \ttitle       : 'Awesome Test Suite',  \t\/\/ \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432 \tautoRun\t\t: true,  \tpreload     : [ \t\t\/\/ version of ExtJS used by your application \t\t'..\/ext-4.1.1\/resources\/css\/ext-all.css', \t\t'..\/resources\/yourproject-css-all.css',  \t\t\/\/ version of ExtJS used by your application \t\t'..\/ext-4.1.1\/ext-all-debug.js', \t\t'..\/yourproject-all.js' \t],  \tlisteners: \t{ \t\t\/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e \u0437\u0430\u0432\u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \t\ttestfinalize: function(event, test) \t\t{ \t\t\tvar fail = test.$failCount, \t\t\t\tpass = test.$passCount;  \t\t\tvar log = (fail ? '~~~~~~~~\\n FAILED  ' : '[PASSED] ') + \t\t\t\ttest.url + ' [pass: ' + pass + ', fail: ' + fail + ']' + \t\t\t\t(fail ? '\\n~~~~~~~~' : '');  \t\t\tconsole.log(log); \t\t},  \t\t\/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e \u0437\u0430\u0432\u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \t\ttestsuiteend: function(event, harness) \t\t{ \t\t\tconsole.log('END_TESTS'); \t\t}  \t}  });  Harness.start( \t'010_sanity.t.js', \t'020_basic.t.js' ); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0442\u0435\u0441\u0442\u043e\u0432 run-siesta.js \u043f\u0430\u0440\u0441\u0438\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0430 \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432, \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0431\u0449\u0435\u0435 \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c (0 \u2013 \u0443\u0441\u043f\u0435\u0445, 1 \u2014 \u043e\u0448\u0438\u0431\u043a\u0430), \u0447\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f CI.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/7c4\/b6e\/464\/7c4b6e4644f8971bcc750327c4806f1a.jpg\"\/><\/div>\n<\/div>\n<h5>TODO<\/h5>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b PhantomJS \u043f\u043e \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0443, \u043d\u0430 \u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043a\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f END_TESTS.<\/p>\n<h5>\u0418\u0442\u043e\u0433<\/h5>\n<p>  \u041f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0444\u0430\u0439\u043b\u0438\u043a\u0430 \u0441 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c 499$.<\/p>\n<p>  \u041f\u0440\u043e\u0444\u0438\u0442? \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/189144\/\"> http:\/\/habrahabr.ru\/post\/189144\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0417\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u044b Siesta \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u043b\u0430\u0442\u043d\u0443\u044e (\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e) \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u043e\u0438\u0442 499$). <\/p>\n<h5>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h5>\n<p>  \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f (\u043b\u0430\u0439\u0442) \u0432\u0435\u0440\u0441\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 <a href=\"http:\/\/www.bryntum.com\/products\/siesta\/\">Siesta<\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0410 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f CI \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u0437\u043e\u0440 \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u043a\u0443\u0441\u043d\u043e\u0441\u0442\u0435\u0439, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u0421\u0430\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a PhantomJS \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0432\u043e\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u0418\u0437\u0443\u0447\u0438\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e Phantom JS, Siesta \u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 Jasmine \u0438 QUnit, \u043c\u043d\u043e\u044e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u0441 \u0432\u0430\u043c\u0438 \u0434\u0435\u043d\u044c\u0433\u0438.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-189144","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/189144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=189144"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/189144\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=189144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=189144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=189144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}