prmr / Creco

Recommendation System for Consumer Products
Apache License 2.0
6 stars 2 forks source link

Test Filtering #52

Closed asutcl closed 10 years ago

asutcl commented 10 years ago

The testing the JUnit use the database directly and use hardcoded values (based on manual exploration?). These values may change as the database grows with time and these tests will start failing.

The tests should be done independent of the database data as much as possible.

forgues commented 10 years ago

That's the purpose of having a separate set of test files though. We assume the test-*.json files won't change with time, even if the regular json files are updated.

prmr commented 10 years ago

Gabriel's correct. The issue here is that the current design of the Data API does not easily allow unit testing based on synthetic objects, hence the need to use a snapshot of the data. We're working to improve that (Issue #44), but I suggest we leave the test-* snapshot around to allow additional testing. The assumption is that it won't change.

prmr commented 10 years ago

I'm closing this. Once we have #44 done we'll decouple tests from the data files as much as possible, but for now let's sat the test-*.json files won't change.