DyfanJones/sagemaker-r-sdk

Unit tests

Opened this issue · 4 comments

Design unit tests to improve robustness of package.

As most classes connect to sagemaker's api mock test are required. From my understanding R has a framework mockery

R6 mockery example: https://github.com/r-lib/mockery/blob/380d81e1439969908a767e484939450b17b1b9ad/tests/testthat/test_stub.R#L197-L230

If this doesn't work then possibly set up a mock class for unit test similar to how this package works: https://github.com/frbl/OnlineSuperLearner/blob/8d36c4ae946690f53c125362c8081d1039ee2947/R/SMG.Mock.R

Going forwards unit test/mock test will be raised individually testing out specific classes within R6sagemaker. This is to prevent the momentum of the project slowing down. (Apologises for any issues this causes)

Split Packages Requiring Unit tests:

  • R6sagemaker.common
  • R6sagemaker.local
  • R6sagemaker.mlcore
  • R6sagemaker.mlframework
  • R6sagemaker.workflow
  • R6sagemaker.debugger