tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Malcolm Warren <malc...@villeinitalia.com>
Subject Junit and Tomcat
Date Thu, 08 Apr 2010 13:08:49 GMT
Dear All,
I've been going round in circles for about two weeks now trying to work 
out how to use Junit with Tomcat effectively.
Any help or advice about how to do this would be very much appreciated.

The main problems are probably well known, but what does everyone else 
do about it?
But the odd part is that there's very little about all this to be found 
on the internet.

1) I get my datasources from Tomcat, so I can't get to them from Junit
2) I get the path in the file system to my Tomcat folder from Tomcat, 
which is very convenient, but in consequence every path to a file in my 
code depends on this.
For example I'm trying to test a method which uses a value from a 
property file, but I can't do it, because the Junit test can't find the 
property file path.

Searching the web again and again has brought up very little except Cactus.
Cactus on paper looks like a good idea, but Cactus has a very low 
profile in google searches, which possibly means it is not used much.
But more important is the fact that it doesn't appear to be supported 
any more since it uses an old version of Junit without annotations, and 
I'm already used to the new version.

I could probably code round the problem: but the recoding - just so that 
I can test things effectively - will be enormous.

Thanks for any help with this.

Regards,
Malcolm Warren



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message