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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.