Testing in JEE 6? Same Old Story: Not There
Join the DZone community and get the full member experience.Join For Free
OMG. Maybe I went from sippy cup to gulping the koolaid on JEE 6 a bit too quickly. Went to make a simple test today of my project, you know, so I could write more code that, um, worked, and found out that Weld doesn‘t really provide testing yet of the bean container. I wish I could say I was lmao, but it‘s really so pathetic it‘s sad.
Look at these surreal discussions:
‘Hey Jim, did you bring the tests?.... ask Pete.. huh, ok… crap, I know we talked about tests….‘
Tried to make a test following the model of the last item on that thread but it didn‘t work: said there was no bean.
Seriously, decade and a half and we are still not able to do a helloworld with beans that has a test.
I have a radical proposal for a revision to the Agile Manifesto: when assembling a stack, if any part of it is not easily covered by testing, provided as part of that stack, MOVE ON!
Update : Ok, so I went and looked up the error. I don't see how Weld-SE testing works. It just doesn't find the beans. One thread said 'you need a beans.xml in src/test/resources/META-INF' (didn't work). Another said use Arquillian. I went and looked at that, but even if you can get that going now with Weld, their page shows (in the support matrix) that there is no support for persistence yet. Awesome. Ok, well, then I can use this on all my projects that don‘t need to save anything..!
Opinions expressed by DZone contributors are their own.