[JBoss Seam] - Love the test support in seam except for...
by andrew.rw.robinson
Seam's TestNG support is quite nice, but there is one major design flaw that really affects test case design.
The test classes are designed to be used as a black box. The init and cleanup methods are made to be used at the class instance level. Ramping up Seam is very slow. My project, which is still small takes a long time to initialize mainly because of: seam deployment, hibernate configuration, drools rule parsing.
Having each test class ramp up all of the full stack is not feasible for time reasons. This means that it is best to put all unit tests in one class with hundreds of methods. I really don't like that design. I would prefer to build a test class for each entity bean and for each managed bean.
What would be great is to re-architect the test classes so that the init and cleanup are annotated with @BeforeSuite and @AfterSuite respectively. The variables that these classes should be either static or made in such a way that there is only one instance per test suite.
If they could be made in such a way that they could also be run in parallel in one JVM instance (forkMode of once) that would be great as well, as then the tests could simulate a server with many requests at once.
I can probably hack this behavior into my test cases, but it would most likely break with changes to the source as I may have to use reflection to set the private variables.
Any chance at getting this type of functionality in the provided test classes?
Thanks,
Andrew
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115057#4115057
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115057
18 years, 4 months
[JBoss Seam] - javax.el.PropertyNotFoundException
by vikramchhetryy
Hi all,
My code looks like this:-
User.java
| @Entity
| @Name("userBean")
| @Scope(SESSION)
| @Table(name = "abcd")
| public class User implements Serializable {
|
| private static final long serialVersionUID = -7928759431732764467L;
| private String StrUserName;
| private String StrPassword;
|
| @Id
| @NotNull
| public String getStrUserName() {
| return StrUserName;
| }
| public void setStrUserName(String strUserName) {
| StrUserName = strUserName;
| }
| @NotNull
| public String getStrPassword() {
| return StrPassword;
| }
| public void setStrPassword(String strPassword) {
| StrPassword = strPassword;
| }
|
| }
|
login.xhtml
<div class="dialog">
| <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
| <h:outputLabel for="StrUserName">Username</h:outputLabel>
| <h:inputText id="StrUserName"
| value="#{userBean.StrUserName}"/>
| <h:outputLabel for="StrPassword">Password</h:outputLabel>
| <h:inputSecret id="StrPassword"
| value="#{userBean.StrPassword}"/>
| </h:panelGrid>
| </div>
I m getting following exception while loading login page
javax.el.PropertyNotFoundException: /login.xhtml @26,64 value="#{userBean.StrUserName}": Property 'StrUserName' not found on type com.xyz.user.User
Any help would be appreciated.
Regards,
Vikram
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115054#4115054
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115054
18 years, 4 months