How to apply JsUnit test on isomorphic based application

objective is to determine if there is any value in using JSUnit framework for testing the Isomorphic integration and any custom javascript code. I want to integrate JSUnits with Isomorphic code. Things that I am looking for:

  •     How long does it take to create JSUnits?
    
  •     Can it / How can it be integrated to call Isomorphic?
    
  •     How are the JSUnits included in main page (or other component container) to test and execute
    

Yes, JSUnit can be used with SmartClient. Call SmartClient APIs as normal (eg ListGrid.create()) and inspect state as normal (eg ListGrid.getSelectedRecord()).

The other questions should be answered by reading through JSUnit’s documentation.

How to apply JsUnit test on isomorphic based application

Hi,
Thanks a lot for quick reply.

I have gone through the Jsunit’s reference document. I will really appreciate if you could please elaborate a littile bit more on what you were suggesting.
I mean where should we keep the Jsunit framework in the folder structure of the SmartClient based application? Do we need to include all the Smart client .js files in my every test page? and how to integrate exactly with the Smart Client based application. Any example on this would really do a great help to us.
Looking forward to hear back from you.

Thanks and Regards,
Saeed

Hi Saeed,

Place your files anywhere that makes sense for your project. Load the SmartClient modules you need for the test, as with any other page or application.

If you would like further help creating JSUnit test cases, contact Isomorphic about consulting and training services.

How to apply JsUnit test on isomorphic based application

HI,

In case of testing javascript functions that are within the .jsp file itself, we can test it by having the replica of those functions in the Test Page. But what if we don’t want to write the javascript functions in the Test Page (one reason could be the functions are too many, and few functions are too large). We tried including that .jsp into our Test Page, but when we run the Test Page, it hangs on.

Please resolve the issue
Thanks,
~Saeed

Why wouldn’t you put the JavaScript functions in a .js file, and include that?