7 Replies Latest reply on Feb 5, 2010 7:10 PM by Dan Allen

    Good starting point for testing CDI + JPA data layer?

    Steven Boscarine Apprentice
      I am new to Java EE and need to write a TestNG integration test that hits my database.  My application is in Java EE 6 on Glassfish v3 Web Profile (JBoss 6.0 hasn't been released as of this post) and uses CDI and JPA 2.  I have a DAO layer and want to test that my JPA code doesn't have errors and works perfectly with our legacy database schema (Oracle).

      I've checked out and built Arquillian.  Which examples should I reference to learn how to test my data layer?

      In the past, I've used Spring and moved all of my database config to a single file and loaded it via AbstractTestNGSpringContextTests. Is there an equivalent in Arquillian I should look at?

      For performance sake, I'd prefer not to load the layers above it or features I don't need like JMS or JSF,  if I can avoid it.  However, I need to actually hit the external database and will most likely need to hit some @Stateless EJBs.