I need to use JSUnit in my Spring -MVC project. It seems that I could write some test pages, include some of my js files, write some tests and load my pages using testRunner. Good.
But loading jsunit comes with jsunit.jar, which implies that I should be able to control this process from a JUnit test. Maybe even without a test page? I do not know, because I can not find examples of using jsunit.jar.
I'd rather see a few examples than create an instance of each class contained in a jar file, and see what methods it has, and of course you can all sympathize. Can someone point me to some examples or insert simple here to get me started?
Many thanks.
Edit
My goal is to wrap JsUnit in JUnit so that I can right-click on the project and run as JUnit and execute my JsUnit test suite (so I renamed my question to reflect my intentions). If jsunit.jar does not fit, maybe someone knows a different way, i.e. load test pages from Selenium or something else. I saw some solutions that run a test suite when I build a project, and although it can really be convenient, this is not the solution I'm looking for. I want my test suite to run locally in an automatic way, and not just during deployment, and I want them to be run from my JUnit test suite, so I don’t need two different processes to run all my tests.
Edit
From jsunit.net:
The JsUnit server addresses 3 needs:
- XML ( , JUnit)
- JsUnit JUnit Ant
- JsUnit JUnit Ant , .
, JsUnit JUnit. - . !!