Help

Controls

PermLinkWikiLink

Built with Seam

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.

Forum: Seam Users Forum ListTopic List
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?

7 Replies:
18. Feb 2008, 21:07 CET | Link

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...

18. Feb 2008, 21:42 CET | Link

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?

18. Feb 2008, 21:40 CET | Link

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

18. Feb 2008, 22:25 CET | Link

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?

20. Feb 2008, 17:39 CET | Link
Rodrigo Yoshima wrote on Feb 18, 2008 10:25 PM:
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 test-build directory inside your IDE.

20. Feb 2008, 08:46 CET | Link

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.

20. Feb 2008, 09:38 CET | Link

Now I used jdk1.5 ,then the problem not appears. And another step is manully add jdt core lib to test classpath.