I am using PHPUnit to test my PHP source code, but I need a way to test client-side code, too. I use ExtJS to build rather complex interfaces that call the server for data. I am wondering here is how does one test the UI?
There's a new tool that just came out recently called Siesta. It's geared toward Ext JS specifically (though can also test any JS code) and it's a great fit for testing Ext JS UI code as it has built-in Ext JS event simulation and recording.
I also personally use Jasmine for my unit testing, as does the Ext JS team internally, though it's not particularly well suited to UI testing (it's great for testing code though).
There are many different ways.
If you want to test it functionally (like a user) then use something like Selenium or Watir. This will work through your site as a user would and exercise the JavaScript and the Backend code.
If you want to just test your JavaScript by itself then i would use JSTestDriver. It allows you to unit test your JavaScript. It doesnt support async calls but can do the test.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With