tag:blogger.com,1999:blog-3958414911648150766.post3929407098903635026..comments2023-04-02T08:31:10.427-07:00Comments on Badr ELHOUARI Blog: How to test primefaces component with JSFUnit2Badr ELHOUARI's Bloghttp://www.blogger.com/profile/03685324592507728405noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-3958414911648150766.post-88482792967341133372014-11-10T04:08:09.608-08:002014-11-10T04:08:09.608-08:00hey badr!
I am using JSFUnit 1.3 and with cactus ...hey badr!<br /><br />I am using JSFUnit 1.3 and with cactus 1.7, on a project where primefaces are used. Here I have two problems.<br />1)It seems that the javascript code generated(I have no idea what it does), while rendering the primefaces page seems to be faulty. It throws an exception about the same<br />2)I use a method in WebClientSpec class so that it skips the javascript validations. But I couldn't figure out how to write a test case on component, i tried using the HtmlUnit api but it turns out that the javascript part of the component is not rendered, hence leaving the component 'non-ajax'. The rendering in the browser is just fine, but when it comes to HtmlUnit there seems to be a bit of problems. Please help!!!!!<br /><br />Thanks in advanceAnonymoushttps://www.blogger.com/profile/14129089652923607795noreply@blogger.comtag:blogger.com,1999:blog-3958414911648150766.post-87702159111251485232011-10-14T14:12:57.199-07:002011-10-14T14:12:57.199-07:00I think giving client ID for each component is fro...I think giving client ID for each component is from the best practices in web developpement, also unit testing main goal is when you change your implementation ( client id in this case) you test will fails and you will be noticed for that ;-) More over i think creating an application web driver interface will not be usefull for white box testing (with Selenium for example)Badr ELHOUARI's Bloghttps://www.blogger.com/profile/03685324592507728405noreply@blogger.comtag:blogger.com,1999:blog-3958414911648150766.post-13062007081649674042011-10-13T13:49:55.677-07:002011-10-13T13:49:55.677-07:00I kind of like this jsfunittest my only fear is th...I kind of like this jsfunittest my only fear is that it depends tightly on the view client code ( as for the date component example ) this not good because after a while you will find your tests unusable and will invest more time (money ;) ) to keep them runing...<br />An alternative will be creating an application web driver interface that do the thing and that is almost loosely coupled to the html code.Ayoub El Abbassihttps://www.blogger.com/profile/05626844516823276072noreply@blogger.com