PDA

View Full Version : ExtJS & Jasmine



code_expert
25 Jul 2012, 8:08 AM
Hi,

I am new to ExtJS MVC and also Jasmine, and I 'd like to use Jasmine for testing my application which is in Extjs and java on the server. I have set up Jasmine as directed in the API doc in my project but I have a hard time to understand how should I make it display a grid view, click on a button, etc. I was wondering if anyone here knows a good source for a tutorial, or some examples that help me get started. I have read the wiki on jasmine, and the example on extjs site, but still have a hard time. I am also new to the whole javascript unit testing concept. Can someone help please?

Thanks,

scottmartin
25 Jul 2012, 10:03 AM
You will most likely have to search around the net for this info.

few links:
http://www.sencha.com/forum/showthread.php?118410
http://alexisdorn.de/arapi-ext/doc/#!/api/Arapi.unittest.JasminePanel
http://evanhahn.com/?p=181
google: 'Davis Frank's Jasmine video'

You might also want to have a look at Siesta:
http://www.bryntum.com/products/siesta/

Scott.

arthurakay
25 Jul 2012, 12:46 PM
I've written about using Jasmine with Sencha a bunch of times before on my blog. A recent post:
- http://www.akawebdesign.com/2012/01/23/automating-javascript-unit-tests-with-git/

The issue you have is that Jasmine is a tool for UNIT TESTS... not INTEGRATION TESTS. Jasmine isn't really the right tool for testing if a user has clicked on a button, a row, etc. Jasmine is better for testing the logic in your handlers - but you don't need to simulate the physical clicks for that.

If you're really trying to solve the problem of integration tests, definitely check out Siesta.

Faizal Rub
27 Mar 2014, 8:06 AM
Agree, many articles pointing in the wrong direction, concentrating ExtJs integration testing using Jasmine. Jasmine is for unit testing only. Selenium also works better for integrated testing.