Hi all,
The development of a testing framework using test_that has made some good progress. We have now define two categories of tests; expected numerical values for combined and split data set as well as mathematical properties.
We have also defined a new data set for testing that will be available locally and on the Opal server. It includes all the data type available in R and also some factor. We are currently in the last phase to integrate it with our continuous integration test.
I will provide more information in wiki in the coming weeks and provide more information too. You can have a look in the following link, under test and test_that.
I value your feedback.
Best wishes,
Patricia
Hi @PatRyserWelch
I am now trying to write some expected value tests for the mixed model SLMA functions. My understanding of how this should work would be that I calculate something on the servers and bring the result back to the client. I then calculate the same thing on the client with the same data, and compare the results. Hopefully they will be the same within a tolerance!
I can see that so far this type of testing is only available in some of the more basic functions like ds.mean
. It looks like at the moment the only data available in ds.test_env is the testing data set. But I will need a dataset for mixed models (CLUSTER.dtPatient_*) to be there. How can I make this dataset be available?
Thanks
Tom
Hi Tom,
First of all, you have understood well the concept of the expected values; that is we compare some values obtained locally against the results from DataSHIELD.
In its current form, there is more than ds.mean that has some expected-values tests. A few more functions are being written too
Since we have devised the. Test_data sets, it has been acknowledged between Demetris, Alex, Hasan and myself it may not be suitable yet for every type of functions. So, Alex has been working on a new data set to test any function that groups
data and do something with these results. We have included some positive and negative integer and decimal values. We have also included some characters values. The testing datasets includes some data types that are included in R. These testing datasets should
not only hold the numerical values, but some also some characters, Boolean and other factors. Then, we can test all functions with those and check they return the expected outcome, like in R.
We store the data sets locally as .csv files. We also store the same data in our VMs used to test locally and in the continuous integration. Then, we can compare the data. I am wondering if we should discuss over a Skype call your needs for the
test data. Then, I can understand better, how I can help you.
Contact me to my normal email and we can arrange a suitable time.
Best wishes,
P.
Dr Patricia Ryser-Welch
When restraint and courtesy are added to strength, the latter becomes irresistible.
Mahatma Gandhi
Start by doing what’s necessary; then do what’s possible; and suddenly you are doing the impossible.