title: PhantomJS QUnitTeamCityDriver QUnit test run
body: <p>I would like to use unit testing for JavaScript in TeamCity.</p>
  
  <p>I am using QUnit, and I have seen a  couple of places that suggest using phantomjs and QUnitTeamCityDriver.  I just have not been able to get it to work...</p>
  
  <p>I don't have a lot of experience in this, and can't seem to even get phantomjs to run unit tests in command line.</p>
  
  <p>I literally copied the example from QUnitTeamCityDriver: simple_test.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;QUnit Example&lt;/title&gt;
    &lt;link rel="stylesheet" href="test_tools/qunit-1.10.0.css"&gt;
    &lt;script type="text/javascript" src="resources/jquery-1.8.1.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="test_tools/qunit-1.10.0.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="qunit_teamcity_driver/QUnitTeamCityDriver.js"&gt;&lt;/script&gt; 
    &lt;script type="text/javascript" src="tests.js"&gt;&lt;/script&gt; 
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id="qunit"&gt;&lt;/div&gt;
    &lt;h1 id="qunit-header"&gt;QUnit example&lt;/h1&gt;
    &lt;h2 id="qunit-banner"&gt;&lt;/h2&gt;
    &lt;div id="qunit-testrunner-toolbar"&gt;&lt;/div&gt;
    &lt;h2 id="qunit-userAgent"&gt;&lt;/h2&gt;
    &lt;ol id="qunit-tests"&gt;&lt;/ol&gt;
    &lt;div id="qunit-fixture"&gt;test markup, will be hidden&lt;/div&gt;   
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>tests.js has some simple tests that work or not, if I try it with the simple_test.html.</p>
  
  <p>The other referenced files, in the html, are in the respective folders, of course.</p>
  
  <p>phantomjs.exe, tests.js and simple_test.html are in the root of the directory I am calling from.</p>
  
  <p>The directions for TeamCity build are:</p>
  
  <pre><code>Add a "Command Line" Build Step to your build in TeamCity which executes Tests.htm via PhantomJS
  Command executable: C:\PhamtomJS\phantomjs.exe
  Command parameters: \Scripts\QUnitTeamCityDriver.phantom.js Tests.htm
  </code></pre>
  
  <p>(which doesn't work, so I want to test on actual command line before putting in the command line inside TeamCity)</p>
  
  <p>Some things I have tried:</p>
  
  <pre><code>phantomjs.exe tests.js
  phantomjs.exe tests.js simple_test.html
  phantomjs.exe simple_test.html
  phantomjs.exe test_tools\qunit-1.10.0.js tests.js simple_test.html
  phantomjs.exe qunit_teamcity_driver/QUnitTeamCityDriver.phantom.js simple_test.html
  </code></pre>
  
  <p>result: either Parse error or Can't find variable: test</p>
  
  <p>Please, can someone point me in the right direction, give me an example, tell me what I am doing wrong ? Thank you very much.</p>