Error in testSection[`exercise1]

 Regarding capstone advanced project, have a quick query

 

After completing section1/exercise 1, when I tried running testSection it shows 1.3 as Fail, however 1.3 works fine independently (i.e right click .f1.createLapTable->code->runtest shows “All 2 tests passed”)

 

show testSection[`exercise1]
quizItem  success description                  error

exercise1.1 Pass  “column file in DB should be renamed to lapId” “”  
exercise1.1 Pass  “.d file in DB should be renamed to lapId”  “”  
exercise1.1 Pass  “all column files should be in event dir”   “”  
exercise1.2 Pass  “lapId should exist in event table”      “”  
exercise1.3  Fail    “check if all values are correct”       “”  
exercise1.4 Pass  “check if lap table exists”          “”  
exercise1.4 Pass  “create new lap dir in f1 DB”         “”  
exercise1.4 Pass  “create col files for lap table”       “”  
exercise1.4 Pass  “.d file should consist of all col names”   “”  
exercise1.5 Pass  “check if lap table exists in date dir”    “”  
exercise1.5 Pass  “create col files for lap table”       “”  
exercise1.5 Pass  “.d file should consist of all col names”   “”

 

Could someone please advise if this is a setup problem (e.g. testSection using sensor table with random data as input however comparing with pre-defined output) or with my API, if API I would like to know how to debug/get more insight please.

 

Thanks in advance

Rajesh

Hi Rajesh,

Agree this is not ideal that .f1.createLapTable unit test is only checking that sensor has correct start and end times (you can see this by going in and looking at the quke file). But the unit test run as part of testSection is more comprehensive, arguably the individual .f1.createLapTable unit test should be expanded to test for more criteria - if you have any suggestions of additional conditions please share and we can add them!

In any case, re. your question on how to debug your solution - test your output matches exactly with the sample data tables for a start, things to look out for include meta matches - your columns may be in a different order perhaps? You could create a event/sensor sample tables with the same data input as in the image below.

 

Hope this helps!