-
1. Re: Keep embedded running: running tests faster?
ljcoomber.seamframework.org.coomber.org Jul 28, 2008 10:07 PM (in response to luxspes)The version in CVS does this but the comment in the JIRA issue shows an example of how to do it in the current release versions:
-
2. Re: Keep embedded running: running tests faster?
luxspes Jul 28, 2008 10:38 PM (in response to luxspes)Hi!
Nice idea, but, AFAIK that should only make Seam initialization faster (not prevent jboss embedded re-initialization each time one has to run the tests).
What I would like to have is something that could
start jboss embedded
and keep it started between tests execution.That way, I could:
- Run my test for the first time in day (takes 24 secs to init jboss)
- Fix an error
- Run my test for the second time in day (takes... i don't know... a lot less? 10 secs? 5 secs?)
Do you think that is possible?
Regards,
-
3. Re: Keep embedded running: running tests faster?
ljcoomber.seamframework.org.coomber.org Jul 29, 2008 9:39 AM (in response to luxspes)Sorry, I mis-read your question - this will stop Seam re-initializing JBoss Embedded during a suite of tests which will help when/if you get to 300 tests.
As for your actual question, I don't know enough about JBoss Embedded to give you a definitive answer I'm afraid.
-
4. Re: Keep embedded running: running tests faster?
pmuir Jul 29, 2008 1:06 PM (in response to luxspes)It sounds like you want to run your tests in a real container, not embedded. Look at JSFUnit.
-
5. Re: Keep embedded running: running tests faster?
luxspes Jul 29, 2008 4:52 PM (in response to luxspes)Hi!
Pete Muir wrote on Jul 29, 2008 13:06:
It sounds like you want to run your tests in a real container, not embedded. Look at JSFUnit.Maybe that is what is needed, but I have the feeling that having to run a real container will make things slower instead of faster..
There isn't any other way to make this faster?
-
6. Re: Keep embedded running: running tests faster?
luxspes Jul 29, 2008 9:16 PM (in response to luxspes)I was wondering... if all I use are Seam POJOs, and then I do not need the EJB features in JBoss... do I still need Jboss Embedded for my Seam tests? for what exactly? are there ways to disable everything I don't use to make jboss embedded load faster? In other words:
If my project is a WAR, and I only use Seam POJOs (and I do not use anything EJB related) can I configure jboss embedded to run in a
lighter
mode? (or replace it with something else? like, i don't know, perhaps Jetty (if what is missing is a servlet engine)?)Thanks
-
7. Re: Keep embedded running: running tests faster?
pmuir Jul 29, 2008 10:35 PM (in response to luxspes)Well an embedded container is booted by the test so by definition starts and stops between test executions.
I guess if you can boot Seam manually you can get away with not using any container at all. Or, as I said, look at deploying to a real container like Tomcat.
-
8. Re: Keep embedded running: running tests faster?
luxspes Jul 30, 2008 8:04 PM (in response to luxspes)Great! If I get rid of embedded jboss (for my tests), instead of taking taking 24297 ms to run 1 test, it now takes 14000ms (that is a 10000ms (10 seconds) reduction)!
Mmmm, I am wondering if developing over tomcat (or jetty) will give me the same performance improvements...
Thanks!
(BTW Do you know, if there are plans to improve this slow booting of embedded jboss? (perhaps for 5.0). I saw some demos of the next version of Glassfish that was able to boot in less than 3 seconds)
-
9. Re: Keep embedded running: running tests faster?
svadu Jul 30, 2008 11:01 PM (in response to luxspes)Since Seam test framework relies on jndi I don't think the tests can run without JBoss embedded (which is is also a source of some problems in implementing it-tests with maven).
-
10. Re: Keep embedded running: running tests faster?
luxspes Jul 31, 2008 12:09 AM (in response to luxspes)Hi!
Siarhei Dudzin wrote on Jul 30, 2008 23:01:
Since Seam test framework relies on jndi I don't think the tests can run without JBoss embedded (which is is also a source of some problems in implementing it-tests with maven).They can, and they run, and way faster :-D.
The problem of jndi for the datasource is easily solved by using Spring.
Of course, if you are using JNDI and/or EJB instead of POJOs for other things, you still need to use JBoss embedded.
Fortunately, I am only using POJOs.