You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
| Online: | 23 Members of 4546 |
| Forum: Seam Users |
18. Feb 2008, 21:02 CET | Link |
Is it possible to run SeamTest classes inside Eclipse?
My current 1.2.1 project based on seam-gen runs OK on 'test' ant target, but doesn't run via right-click on the IDE because Jboss MC doesn't find the components on the IDE classpath.
Any ideas?
It is supposed to work, and it used to, but some changes have been made to the MC, and so I'm not sure if it's working anymore. Try reporting this in JIRA.
Learn more about Web Beans...
Here it is...
http://jira.jboss.com/jira/browse/JBSEAM-2648
Why Seam Bijection is so tied to EJB infrastructure? Is it possible to inject components manually in runtime? (see below)
It's been really hard to use TDD and Seam... Every single test takes 20 seconds to run and extending FacesRequest turns my tests quite verbose and hard to read.
Maybe we have to improve the way we do integration tests with Seam (plain-plain JSE environment, just bijection and resource-local entitymanager would be OK). I don't know if you have discussed this before.
For an example, project is a Session scope component: new FacesRequest() { protected void updateModelValues() throws Exception { setValue("#{project}", new Projeto()); } }
Gives me:
[testng] javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier 'project'
What do you think?
Seam 2.0.1 test do work under IDE. You have to make sure that *-all.jar files come first in the classpath (needed for jboss embedded), may be you can do the same trick for 1.2.1.
Regards,
Siarhei
Strange: running via 'test' ant build target automatically starts the MC, running inside de IDE MC doesn't start.
If I extend SeamTest should I manually start EJB3Bootstrap? Which class start it up?
Got it running! It works if you put an empty seam.properties file inside every classpath root that contains Seam components. Now my tests are running inside Eclipse & Embedable EJB3.
You also need to put WEB-INF / META-INF in the IDE classpath. So, you need the same structure as directory inside your IDE.
Siarhei: Could you show a more detail description how to make seam test work under IDE? now I only use unit test through testng plugin, when i want to extends SeamTest, console displays some class not found.
Now I used jdk1.5 ,then the problem not appears. And another step is manully add jdt core lib to test classpath.