Is there Unit Test Framework in Orbeon?
I am wondering if there is any Unit testing framework for testing the Orbeon Forms.
The unit testing that we are trying to attain are event check, enable-disable check, navigation checking, elements style checking etc... I tried selenium IDE(using it as a Firefox plugin) as a POC. It had a ease in creating the test case. But when I encountered repeated sections in my form, the id generated for each field was diff开发者_运维问答ering at times whenever we refresh the form. So had to drop the idea using selenium IDE. I happen to see this YDT-cleint side unit test link in orbeon wiki. But was not able to get much of idea about the usage of this YDT, or how to integrate with orbeon.The unit tests for Orbeon Forms itself fall into 3 categories:
- JUnit-type tests, running on the server (e.g. a test for Liferay)
- XPL-based tests, running on the server (e.g. for XBL componnents)
- YUI Test-based tests, running on the browser (e.g. a test for the autocomplete)
For applications/forms you write on Orbeon Forms, I would recommend you use Selenium. Since you need stable ids for Selenium, make sure to explicitly put an id attribute in your XForms on everything you'll want to test on in Selenium. (If you don't, as you've noticed, Orbeon Forms generates ids, which can easily change when you update your form.)
精彩评论