I trying to use phantomjs call angularjs test on hudson server. But it's seem like phantomjs shutdown itself before angularjs done theirs test. Does it has some method or way to make phantomjs wait until angular test script done before graping result.
Maybe you can check QUnit runner for PhantomJS example, which comes with phantomjs. In function called waitFor. But I don't know if this example will help you with angularjs. In case of QUnit the main idea is to check for div with id = 'qunit-testresult' using setInterval function to determine if QUnit has completed.
NOTE Don't forget asynchronous nature of JavaScript and PhantomJS :)