Monday, January 5, 2009

JSF 2.0 and the upcoming GA release of JSFUnit

I don't work on JSFUnit full time. A big part of my responsibility at JBoss/Red Hat is to make sure that JSF and Seam integrate nicely with the JBoss Application Server.

So I've been looking at the JSF 2.0 Public Review release. Using JSF 2.0 with JBoss AS 4.2 and AS 5.0 seems to be just a matter of replacing jsf-api.jar and jsf-impl.jar. I'm sure that I'll come across some things that need more/better integration. And when I do, I'll have to implement something new. But for now I'm happy to be able to play with the JSF 2.0 PR release as-is on JBoss AS.

To see how much would run without error, I decided to go ahead and upgrade JSFUnit to work with the new JSF 2.0 API. That required adding methods to JSFUnitFacesContext and JSFUnitExternalContext. There were some other code changes, including a change to the Environment class that detects which version of JSF is running.

Anyhow, I'm happy to report that JSFUnit now works with JSF 2.0. You can download the latest JSFUnit snapshot if you'd like to play with it. The part of the JSFUnit test suite that doesn't run is execution of the applications that use Facelets and Ajax4Jsf/RichFaces together. I've filed a bug on it, so hopefully that problem will be resolved soon. Please leave me feedback on the JSFUnit Forum if you decide to give it a try.

Lastly, I've been asked several times when JSFUnit is going to go GA. There is really nothing stopping me now except that I'd like to fix a few more bugs and maybe add support for IceFaces. Look for a release in mid-February.

So long and thanks for all the fish,

Stan

5 comments:

Ken Fyten said...

Stan,

Let me know if you need any help with the ICEfaces integration, we'd be very pleased if JSFUnit worked well with ICEfaces. :)

Regards,
Ken Fyten
VP Prod. Dev., ICEsoft

damien.gouyette said...

I just try to make work an application using jsf2 with jboss AS 5.0.0.GA
I changed jsf-impl and jsf-api like you said, but it doesn't work, when my server starts, i have the following exception :

Factory 'javax.faces.context.FacesContextFactory' was not configured properly

which version of jboss did you try ?

Stan Silvert said...

I used AS 5.0, but I don't remember if it was the GA version.

Can you post your problem with a full stack trace on the forum?

http://www.jboss.org/index.html?module=bb&op=viewforum&f=269

Stan

damien.gouyette said...

Sorry about that.

maven don't help me, he didn't undestood my provided scope, or it's my mistake.

I works really better when i delete jsf-ri from my webapp in deploy's folder.

thanks for your help, i will try jsfunit now with jsf2

damien.gouyette said...

I add a post here about JSF 2 + jsfunit problem when using microdeployer :

http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215201#4215201