prmr / Creco

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

Data API and Database testing #19

Closed asutcl closed 10 years ago

asutcl commented 10 years ago

This issue will be used to write tests to ensure that the data API is performing as we expect it to and more importantly to make sure that database follows our assumptions.

Please feel free to suggest any tests you would like to see. Here is a list of tests I will be starting with:

-Jaccard Index -Product lists (add,remove, count) -Attribute lists (add,remove, count) -AttributeStat values (min, max, Enum,count) -Category (getProducts, getSpecs, getRatings) -CategoryList -TypedVal

asutcl commented 10 years ago

Edward pointed out to me that my test was failing when running gradle build.

The error was due to a file not found exception: java.lang.AssertionError: Exception caught java.io.FileNotFoundException: C:\temp\data/category.json (No such file or directory)

However, it does not fail when running it as a JUnit test. This seems to indicate to me that for some reason the gradle build doesn't take in consideration the localdatapath. Something else that is odd is that the data path test is not run anymore in the gradle build.

Any ideas?

asutcl commented 10 years ago

So the datapath test passes no problem but CRData.getData() fails when runnning a gradle build.

asutcl commented 10 years ago

Fixed the testdata changed the filepath in the CRData class. Fixed by adding a @After in the TestData class. Thanks Gabriel!

enewe101 commented 10 years ago

Hey Andrew, did you push that change? I still get the failed test.

asutcl commented 10 years ago

Hi Edward,

Yeah I did push the test runs with no error on my pc and I can see that the change was commited on github. Do you have any more details on what the error is?

asutcl commented 10 years ago

Or can you zip the folder with the HTML test results and send it to me?

enewe101 commented 10 years ago

It's exactly the same error as before, and gets fixed if I change @test to @After (along with adding an import). Weird that I don't get the change when I pull. Well it's not the first git mystery, and it won't be the last! Let's not worry about it for now. On Feb 24, 2014 9:19 PM, "asutcl" notifications@github.com wrote:

Or can you zip the folder with the HTML test results and send it to me?

Reply to this email directly or view it on GitHubhttps://github.com/prmr/Creco/issues/19#issuecomment-35967917 .

asutcl commented 10 years ago

This was moved to Issue 25, Test the Data API.