3
votes

While searching the internet it seems that Grunt is the preferred task runner for executing AngularJS test under Karma/Jasmine. Our project has server side java code and browser side javascript code. We already have a full unit test suite for the Java code, which we use ANT to run this suite. I have written some unit tests for our Javascript using Karma, Jasmine and PhantomJS. For CI, I would like to run these Karma scripts the same way that we do the Java scripts, which again is ANT tasks. Having a hard time finding an ANT task for runnig Karma. Would greatly appreciate any suggestions.

1

1 Answers

2
votes

I had a similar requirement and was able to achieve this with the following ANT code:

<target name="unittest">
    <exec executable="karma">
        <arg line="start karma.conf.js"/>
    </exec>
</target>