title: Headless testing of remote JavaScript web-applications
body: <p>There is an web-application, that needs to be tested. This application uses AJAX and jQuery. Tests have to be written for all possible interactions with the browser and client-side. There are some tools for this, for example, Selenium IDE, but I wonder if it is possible to use any headless browser.</p>
  
  <p>So, requirements for the testing system are:</p>
  
  <ol>
  <li>Query pages from the remote server, simulate browser behavior (basically we give the headless browser the URL, browser fetches the page and launches tests on it);</li>
  <li>Inject tested JavaScript or test JavaScript already loaded on the remote page;</li>
  <li>Use any of testing frameworks than can be integrated with any of CI software (Jasmine, Mocha etc.).</li>
  </ol>
  
  <p>It is possible to use mocking techniques when dealing with AJAX requests, for example, but I'm trying to test real-life application. Hope that this question will be useful for anybody.</p>