-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: how can i test caveatemptor-native application?
PostPosted: Sat Feb 16, 2008 8:32 am 
Newbie

Joined: Sat Feb 16, 2008 8:26 am
Posts: 3
Hello everbody;

is caveatemptor native version executable or testable?
if so how can i test the code or run anything? i cant see even a class with a main method?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 16, 2008 5:08 pm 
Newbie

Joined: Sat Feb 16, 2008 8:26 am
Posts: 3
Hello everbody again;
I downloaded the testNG unit testing framework eclipse plug in.
this eclipse plug-in can be downloaded from this address directly:

http://testng.org/testng-eclipse-5.7.0.0.zip

the 16th chapter of the book gives required explanation.with the help of testNG(next generation test framewor which is better than JUnit) now i can test the following test case classes in the book source code:

AspectizedAction.java
AuditLogging.java
Locking.java
MapAndXMLRepresentation.java
PersistentStateTransitions.java
Queries.java
FilterTest.java

i think testing, debugging is better to understand the appliation.
have a nice night...


Top
 Profile  
 
 Post subject: another problem while testing
PostPosted: Sun Feb 17, 2008 5:06 am 
Newbie

Joined: Sat Feb 16, 2008 8:26 am
Posts: 3
hibernate.cfg.xml is in build/classes directory of the caveatemptor-native project. but it can not be found anyway. any idea?


CONSOLE OUTPUT:

[Parser] Running:
C:\eclipse\workspace\CaveatEmptor Native\temp-testng-customsuite.xml

log4j:WARN No appenders could be found for logger (auction.dao.DAOFactory).
log4j:WARN Please initialize the log4j system properly.
FAILED CONFIGURATION: @BeforeMethod beforeTestMethod
java.lang.ExceptionInInitializerError
at auction.persistence.HibernateUtil.<clinit>(HibernateUtil.java:61)
at auction.test.HibernateIntegrationTest.getConnection(HibernateIntegrationTest.java:76)
at auction.test.HibernateIntegrationTest.beforeTestMethod(HibernateIntegrationTest.java:59)
Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)
at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1402)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1424)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1411)
at auction.persistence.HibernateUtil.<clinit>(HibernateUtil.java:51)
... 26 more
... Removed 24 stack frames
SKIPPED CONFIGURATION: @AfterMethod afterTestMethod
SKIPPED CONFIGURATION: @BeforeMethod beforeTestMethod
SKIPPED CONFIGURATION: @AfterMethod afterTestMethod
SKIPPED CONFIGURATION: @BeforeMethod beforeTestMethod
SKIPPED CONFIGURATION: @AfterMethod afterTestMethod
SKIPPED CONFIGURATION: @BeforeMethod beforeTestMethod
SKIPPED CONFIGURATION: @AfterMethod afterTestMethod
SKIPPED: nativeSQLQueries
SKIPPED: basicCriteriaQueries
SKIPPED: joinCriteriaQueries
SKIPPED: projectionCriteriaQueries

===============================================
auction.test.basic.Queries
Tests run: 4, Failures: 0, Skips: 4
Configuration Failures: 1, Skips: 7
===============================================


===============================================
CaveatEmptor Native
Total tests run: 4, Failures: 0, Skips: 4
Configuration Failures: 1, Skips: 7
===============================================


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.