You need to sign in to do that
Don't have an account?
Testing a visualforce page with LOOOOTS of javascript
Ok, so I have created this HUGE chunk of javascript inside my visualforce page which was meant to replace the multi line edit page for OpportunityProduct. The javascript is almost 600 lines big (is it a design fault to begin with? I opted for javascript mainly since I had so many field dependencies that simply could not be dealt with using controlling and dependent fields)
Anyways, I will write a test class next to make sure my extension is working. However, a lot of the testing, in my opinion, will have to make sure the javascript is showing and hiding elements like it's intended to. Any ideas on how I should be approaching QAing this monster of a VF page. I am thinking normal apex test classes along with some javascript testing framework (suggestions anyone?)
Thanks
The problem I've found when doing this in the past is that the testing frameworks aren't really up to heavyweight javascript (and especially ajax), as they need a javascript engine built in.
The best way that I've found is to use Selenium - http://seleniumhq.org/
This is a plugin to the browser that allows you to record scripts and validate that the page changes in response to your actions as you would expect. That way the browser's javascript engine is being used.