mercredi 3 août 2016

Javascript unit testing with Jasmine and JSP

I am working on a project that uses JSP and Javascript. Now I have to write unit tests so I started using Jasmine for it and since the project is built using Maven, My goal was to run unit tests as part of continuous build and integration. So I thought of using jasmine-maven-plugin it uses PhantomJS for headless testing. I tried PhantomJS API to see whether it can load a JSP based webpage. Using the sample api I was able to create a screenshot of my JSP page. So I think PhantomJS can work with JSP.

My unit tests are heavily dependent on the JSP page but I was to not able to configure the Jasmine specRunner to use JSP, so that I can run my Jasmine tests as part of maven build.

Does anybody used Jasmine, Javascript, JSP combination for unit testing? Any help or comments will be highly appreciated. Thanks!

Aucun commentaire:

Enregistrer un commentaire