{"id":561,"date":"2013-01-31T09:06:28","date_gmt":"2013-01-31T16:06:28","guid":{"rendered":"http:\/\/10kdev.ivystreetinc.com\/?p=561"},"modified":"2013-02-01T15:55:55","modified_gmt":"2013-02-01T22:55:55","slug":"simple-script-to-run-qunit-in-all-browsers-locally","status":"publish","type":"post","link":"http:\/\/10kdev.net\/?p=561","title":{"rendered":"Simple Script to Run QUnit in All Browsers Locally"},"content":{"rendered":"<p>Before you check in you should always run a full build. \u00a0If you have \u00a0javascript &#8212; you should run all your tests locally first before the build. \u00a0This is because most automated test systems like JSCover or PhantomJS only use Firefox or WebKit libraries. And most shops do not have access to the full test-in-all-browsers system like BrowserStackAPI with Bunyip yet. \u00a0Someday we&#8217;ll be doing that, but until then, run one of these (on Windows &#8212; Mac\/Linux are easy enough). \u00a0Just make sure to have a web server running, serving up the QUnit code. \u00a0In my case I use HFS Http Server pointing at\u00a0the\u00a0source directory (tests and src).<\/p>\n<pre class=\"brush: bash; light: true; title: ; wrap-lines: true; notranslate\" title=\"\">\r\n\r\nREM this will start up 4 parallel browser instances and run the QUnit tests.\r\n\r\nstart &quot;Firefox&quot; &quot;&lt;full path to&gt;\\firefox.exe&quot; http:\/\/localhost:88\/test\/js\/qunit-require-tests.html?noglobals=true\r\n\r\nstart &quot;IE&quot; &quot;&lt;full path to&gt;\\Internet Explorer\\iexplore.exe&quot; http:\/\/localhost:88\/test\/js\/qunit-require-tests.html?noglobals=true\r\n\r\nstart &quot;Safari&quot; &quot;&lt;full path to&gt;\\safari.exe&quot; http:\/\/localhost:88\/test\/js\/qunit-require-tests.html?noglobals=true\r\n\r\nstart &quot;Chrome&quot; &quot;&lt;full path to&gt;\\chrome.exe&quot; http:\/\/localhost:88\/test\/js\/qunit-require-tests.html?noglobals=true\r\n\r\nREM end code\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Before you check in you should always run a full build. \u00a0If you have \u00a0javascript &#8212; you should run all your tests locally first before the build. \u00a0This is because most automated test systems like JSCover or PhantomJS only use Firefox or WebKit libraries. And most shops do not have access to the full test-in-all-browsers [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/561"}],"collection":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=561"}],"version-history":[{"count":19,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/561\/revisions"}],"predecessor-version":[{"id":604,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/561\/revisions\/604"}],"wp:attachment":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=561"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}