HTML5¼¼Êõ

¹¹½¨×Ô¶¯»¯Ç°¶ËÑùʽ»Ø¹é²âÊÔ¡ª¡ªBackstopJSƪ - laden666666(2)

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2017-02-13 16:03 ÎÒÒªÆÀÂÛ( )

var http = require('http' ); var express = require('express' ); var backstop = require('backstopjs' ); var path = require('path' ); var app = express();app.use( "http://www.cnblogs.com/", express.sta

var http = require('http'); var express = require('express'); var backstop = require('backstopjs'); var path = require('path'); var app = express(); app.use("http://www.cnblogs.com/", express.static(path.join(__dirname ,'../html/'))); sever = http.createServer(app).listen('3000', function() { //Ö´ÐÐbackstop backstop('reference').then(function () { sever.close(); }); });

ÔÚÎÒÃÇÖع¹ÏîĿ֮ǰ£¬¿ÉÒÔÔËÐÐÕâ¸ö½Å±¾£¬ÕâÑù¾Í¿ÉÒÔÉú³ÉÑù°åͼ£¬ÎªÖع¹ºó×ö²âÊÔʹÓá£

Éú³ÉµÄÑù°åͼ¸ñʽÈçÏÂͼ£º

3.²âÊÔ

ÔÚÖع¹ÑùʽºóÖ´ÐÐÃüÁîÐУº

backstop test

ͬÑùΪÁËÄܹ»ºÍ·þÎñÆ÷¼¯³É£¬ÎÒÃÇʹÓÃcommonjsÄ£¿éµÄÐÎʽµ÷ÓÃbackstopjs£¬È磺

var http = require('http'); var express = require('express'); var backstop = require('backstopjs'); var path = require('path'); var app = express(); app.use("http://www.cnblogs.com/", express.static(path.join(__dirname ,'../html/'))); sever = http.createServer(app).listen('3000', function() { //Ö´ÐÐbackstop backstop('test').then(function () { sever.close(); }); });

Èç¹ûÐÂÉú³ÉµÄͼƬºÍÑù°åͼ²»Ò»Ñù£¬¾Í»á±¨´í¡£Éú³ÉµÄ±¨¸æÓÐÁ½ÖÖÐÎʽ——ÃüÁîÐб¨¸æºÍä¯ÀÀÆ÷±¨¸æ£¬ÕâÀïչʾµÄÊÇä¯ÀÀÆ÷±¨¸æ½á¹û£º

Ïêϸdemo¿ÉÒԲ鿴https://github.com/laden666666/BackstopJSDemo¡£

 

ÕâÀïչʾÁËbackstopjs×ö×Ô¶¯»¯»Ø¹é²âÊÔµÄÒ»¸öÀý×Ó£¬backstopjs»ù±¾Äܹ»Âú×ãÎÒÃǵÄÐèÇ󣬿ÉÒÔÖ§³ÖÏìӦʽ²¼¾Ö²âÊÔ¡¢¿ÉÒԺͷþÎñÆ÷¼¯³É¡¢¿ÉÒÔÇл»ä¯ÀÀÆ÷ÒýÇæµÈ¡£²»¹ýÒ²ÓÐȱµã£¬ÒòΪPhantomJSºÍSlimerJS·Ö±ðÊÇʹÓÃwebkit(blink£¬chromeµÄÄÚºË)ºÍ Gecko (FirefoxÄÚºË)×÷ΪÄںˣ¬Òò´ËÎÞ·¨Ä£Äâieä¯ÀÀÆ÷×ö²âÊÔ£¬ÏÂÒ»²½×¼±¸¼ÌÐøÑо¿²âÊÔieµÄ·½·¨¡£

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • Ç°¶Ë¼¼Êõ֮dz¼û - ÃÞ»¨ÌÇ_30

    Ç°¶Ë¼¼Êõ֮dz¼û - ÃÞ»¨ÌÇ_30

    2017-02-08 15:00

  • °ô£¡Ê¹ÓÃ.NET Core¹¹½¨3DÓÎÏ·ÒýÇæ - Savorboard

    °ô£¡Ê¹ÓÃ.NET Core¹¹½¨3DÓÎÏ·ÒýÇæ - Savorboard

    2017-01-29 08:03

  • Ç°¶Ë×ÊÔ´»ã×Ü - ´Þ¿­Í¨

    Ç°¶Ë×ÊÔ´»ã×Ü - ´Þ¿­Í¨

    2017-01-21 13:02

  • ***ÍøWebÇ°¶Ë¿ª·¢¹æ·¶(³õ¸å) - Ò»°ëˮһ°ë±ù

    ***ÍøWebÇ°¶Ë¿ª·¢¹æ·¶(³õ¸å) - Ò»°ëˮһ°ë±ù

    2017-01-18 10:00

ÍøÓѵãÆÀ
×