Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[EJB3UNIT] Data insertion in my database

 
Fabian Angy
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I have a question regarding data insertion into database with JUNIT Test (EJB3UNIT).

I'm testing my method which save record in my database, but, my new records are not saved in my database while they are created because when a record is created, the id are incremented when my method is called.

Thus, i wonder: it is possible that my data are deleted automatically after the insertion? (normal behavior of JUNIT Test or it is a problem with me?).

Thanks in advance.
 
Ramana Rapally
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Fabian,

I am new to EJB3Unit and trying to automate my EJB3 application unit-testing. I wanted to use Oracle database and configured ejb3unit.properties with relevant settings and ran my session bean testcases. It fails to connect to the database, I have verified the database connection via sqlplus and I was able to connect (I also tried connecting via TOAD, it works).

Below is the ejb3unit.properties file:


I am getting the below error:



As I can see that you were able to run your tests without any errors, could you please help me what I am doing wrong.

Thanks in advance.

Regards,
Ramana
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic