Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Testing in JEE 6? Same Old Story: Not There

DZone's Guide to

Testing in JEE 6? Same Old Story: Not There

· Java Zone
Free Resource

Try Okta to add social login, MFA, and OpenID Connect support to your Java app in minutes. Create a free developer account today and never build auth again.

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:

Someone who started to do a runner in JUnit and bailed
On what is a unit?..

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

 

From http://www.jroller.com/robwilliams/entry/testing_in_jee_6_same

Build and launch faster with Okta’s user management API. Register today for the free forever developer edition!

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}