-
1. Re: Testsuite -refactoring to make test easier to run
jesper.pedersen Nov 24, 2010 11:04 AM (in response to maeste)Anyway to make this long story short
Too late
The patch looks good - it should be a lot clearer how to add new test cases.
However, there is one major area that needs to be looked at - the EmbeddedJCA class - as it isn't optimal for both our users but also for us in our test suite.
It needs to be rewritten as a factory/interface pair, so the internals are more hidden from the user -- and the test suite only methods needs to go away. I'll take a look at this after the holiday as discussed on IRC.'
For now just add a (boolean, ClassLoader) constructor in order to continue.
Thanks for looking into this
-
2. Re: Testsuite -refactoring to make test easier to run
maeste Nov 26, 2010 8:31 AM (in response to jesper.pedersen)Jesper Pedersen wrote:
However, there is one major area that needs to be looked at - the EmbeddedJCA class - as it isn't optimal for both our users but also for us in our test suite.
Oki I've opened a jira about test cases refactoring. I'll wait to start it because I think we should make another step and make sure that embeddedJCA could be used in our too test using @RunWith(Arquillian.class).
IOW if we are going to support Arquillian wouldbe cool to use it also into our test suite.
S.
-
3. Re: Testsuite -refactoring to make test easier to run
maeste Nov 29, 2010 4:17 AM (in response to maeste)About this refactoring, I think we should also verify AS6 test suite and port all tests (or verify the already done porting in most cases) refactoring them to use embedded/arquillian approach.
best regards
S.
-
4. Re: Testsuite -refactoring to make test easier to run
jesper.pedersen Nov 29, 2010 8:43 AM (in response to maeste)I'll wait to start it because I think we should make another step and make sure that embeddedJCA could be used in our too test using @RunWith(Arquillian.class).
What do you mean by this ?
There is an example of using Arquillian in our test suite already (./embedded/src/test/java/org/jboss/jca/embedded/unit/ArquillianTestCase.java). More advanced ways of using Arquillian have been filed against Arquillian -- Aslak promised me that those would be in the Beta release.
-
5. Re: Testsuite -refactoring to make test easier to run
jesper.pedersen Nov 29, 2010 8:44 AM (in response to maeste)Yes, and only port those that make sense - all the stress tests needs to go to the performance branch instead.
-
6. Re: Testsuite -refactoring to make test easier to run
maeste Nov 29, 2010 9:11 AM (in response to jesper.pedersen)Jesper Pedersen wrote:
I'll wait to start it because I think we should make another step and make sure that embeddedJCA could be used in our too test using @RunWith(Arquillian.class).
What do you mean by this ?
There is an example of using Arquillian in our test suite already (./embedded/src/test/java/org/jboss/jca/embedded/unit/ArquillianTestCase.java). More advanced ways of using Arquillian have been filed against Arquillian -- Aslak promised me that those would be in the Beta release.
I know, but I think it suffers same classloading problems of plain use of embedded for which I've patched. I'd like to have an Arquillian tests without needings of prepare rar package before.
bye
S.
-
7. Re: Testsuite -refactoring to make test easier to run
jesper.pedersen Nov 29, 2010 9:33 AM (in response to maeste)I know, but I think it suffers same classloading problems of plain use of embedded for which I've patched.
The official Arquillian integration are meant for our end-users which will load the container configuration through the embedded container itself.
That being said there may be a need to extend this integration in our test suite in order to specify overrides - such as the configuration location and so on. This is however specific to the test suite itself and won't be shipped in the distribution. If you have requirements just posts them - this will end up in ironjacamar-embedded-arquillian-testsuite.jar.
I'd like to have an Arquillian tests without needings of prepare rar package before.
Say what ?!? Arquillian deployments are done using ShrinkWrap. What do you mean ?
-
8. Re: Testsuite -refactoring to make test easier to run
maeste Nov 29, 2010 9:47 AM (in response to jesper.pedersen)Jesper Pedersen wrote:
Say what ?!? Arquillian deployments are done using ShrinkWrap. What do you mean ?
Yep right, I've written without double check the problem I had running it iside eclipse...the problem is on kernel startup in embedded that need dependency from embedded binaries. IOW what I'm doing here:
would be nice to have in Arquillian test case too. Or maybe something better than that, but the key for me is the ability for users/contributors to run the test as Junit test inside eclipse without any special config/dependency definition for test runner
-
9. Re: Testsuite -refactoring to make test easier to run
jesper.pedersen Nov 29, 2010 12:02 PM (in response to maeste)the problem is on kernel startup in embedded that need dependency from embedded binaries
From what I can tell from the method you need something like:
EmbeddedJCA embedded = new EmbeddedJCA(false); // For all configuration files embedded.deploy(myConfigurationFile);
to override the configuration used by the container, correct ?
would be nice to have in Arquillian test case too.
That is why we need a test suite extension of the embedded container -- to externalize the configuration paths.
but the key for me is the ability for users/contributors to run the test as Junit test inside eclipse without any special config/dependency definition for test runner
Yes, the default setup should allow just to use the container/configuration on the class path.