MyFaces Test Framework not working with JSF 2.1

Posted by Karl Kildén on Stack Overflow See other posts from Stack Overflow or by Karl Kildén
Published on 2012-06-11T10:35:49Z Indexed on 2012/06/11 10:39 UTC
Read the original article Hit count: 203

Filed under:
|

we have a lot of tests that uses Myfaces Test Framework for JSF 2.0. http://myfaces.apache.org/test/index.html

Problem is we can't get it to work with JSF 2.1. Does anyone know a workaround or a way to solve this?

When we run the tests we get the following error: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory

It works fine with jsf 2.0 though.

A typical use case in our code:

// code block;
assertFalse("Error message not expected. ", facesContext
            .getMessages().hasNext());

JSF 2.1 has a few syntax changes so my guess would be that's the problem.

© Stack Overflow or respective owner

Related posts about jsf-2.0

Related posts about junit4