stanbol-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Grisel <olivier.gri...@ensta.org>
Subject Re: Integration tests - how to handle persisted test data
Date Tue, 21 Jun 2011 14:18:12 GMT
2011/6/21 Fabian Christ <christ.fabian@googlemail.com>:
> Hi,
>
> I'm currently playing with the integration tests and trying to write
> some for the FactStore that I'm working on.
>
> Some of the tests create new Fact Schema and Facts that are stored in
> a Derby database.
>
> My question is how to proceed with the created test data after the
> tests have finished. At the moment the data resides in the database
> after the tests. This causes the problem that the next time the
> integration tests are started some will fail because of already
> existing data. The user has to call "mvn clean" which will delete the
> database before starting the tests.
>
> Is this behavior okay for our tests or is there a policy that says
> that integration tests are not allowed to leave persisted data? Or
> that integration tests need to be idempotent without a clean?

We should extend the integration test tooling to clean the data folder
in some kind of tearDown method (or maybe better do it in a setUp
method before running the tests).

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

Mime
View raw message