[slf4j-dev] Unit tests in slf4j-ext and Maven
Ceki Gulcu
listid at qos.ch
Fri Oct 3 20:06:49 CEST 2008
Hello all,
I have just added a new module called "integration" to perform some integration
tests. For example, "Pre154VersionMismatchTest" checks that if slf4j-api-1.5.4
and slf4j-simple-1.5.0 are on the class path, LoggerFactory will detect the
version mismatch and warn the user. Similarly, VersionMatchTest checks that if
slf4j-api-1.5.4.jar and slf4j-simple-1.5.4 are on the class path, there is no
mismatch warning.
The "integration" module uses Ant to perform these tests, relying on Ant's
flexibility in providing different classpaths to various tasks (this is much
harder to do with Maven). The Ant build file is still invoked by Maven. Thus,
integration tests are run with every build.
I am relatively happy with the results.
Ralph Goers wrote:
>
> Thorbjørn Ravn Andersen wrote:
>> I read up a bit on this. It appears that maven-surefire-plugin cannot
>> both do unit tests and integration tests in the same life cycle (as far
>> as I understood).
>>
>>
> Actually you can. I've done it. I'll dig around and find an example of
> how to do it.
>
> Ralph
>
--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
More information about the slf4j-dev
mailing list