Replies: 8 comments 1 reply
-
@bms63 @millerg23 @StefanThoma think I drew up what is appropriate to do unit-testing wise, any thoughts before I churn them into individual bite sized issues such that we can get definitions of done? What're peoples' thoughts on snapshot testing as well? |
Beta Was this translation helpful? Give feedback.
-
I really like the idea of having the same data object that we use throughout the entire date/time testing suite!! Can we construct that first before we start updating any tests? |
Beta Was this translation helpful? Give feedback.
-
Very happy for snapshot tests. |
Beta Was this translation helpful? Give feedback.
-
Regarding snapshot testing, is this for ERROR checking? We are implementing snapshot testing in admiraldev for assertions, this is part of the updates to ERROR messaging. So only need to snapshot the unit test in admiraldev, we should just be able to test for class of ERROR in admiral, or test partial strings. |
Beta Was this translation helpful? Give feedback.
-
@StefanThoma - From Zelos' proposal. I was thinking the data object would have all these and anything else needed for other date/time tests. Then this object is used throughout all the tests and if we update the object, for some new issue, it runs through every single test again.
|
Beta Was this translation helpful? Give feedback.
-
Precisely, @millerg23 as for why snapshots, on top of the errors, I think it's also just easier to review once we have a known example that we use consistently, don't think we need to remove the |
Beta Was this translation helpful? Give feedback.
-
@StefanThoma @millerg23 @zdz2101 I follow this guy on LinkedIn and he is a goldmine. The Unit Testing principles are for Java, but I thought it was still a cool read - https://docs.google.com/document/d/1_Z9CjOjynrmZiYIvGqrR5sZ2s7v1f-RePAjdFHy9XEk/mobilebasic |
Beta Was this translation helpful? Give feedback.
-
@zdz2101 could we make this into a discussion? Does the click on issue creation happen when this is in a discussion? |
Beta Was this translation helpful? Give feedback.
-
Please select a category the issue is focused on?
Other
Let us know where something needs a refresh or put your idea here!
For each of the 3 test files:
test-derive_vars_dt_dtm_utils.R
,test-derive_vars_dt.R
, andtest_derive_vars_dtm.R
there may be missing tests or additional coverage like NULL, NA, edge cases that need to be flushed out to make development easier.Task will be broken into multiple parts (feel free to turn each bullet into an issue and work on it):
In
test-derive_vars_dt_dtm_utils.R
:dt_level()
#2377get_imputation_target_date()
#2378get_imputation_target_time()
#2409In
test-derive_vars_dt.R
:There is some merit to consistently keep using the same input dataset/thing to test, where we can do:
and apply to all the above^. For the most part I think we do an appropriate range of tests, but can certainly do a better job at the test description or adding code comments where it is appropriate to explain the use case.
Cleanup/make appropriate additions for:
derive_vars_dt()
#2400withr
to remove use of global variables in the unified examplecompute_dtf()
: closed per Clean up documentation on datetime/date flagging functions, e.g.compute_dtf()
/compute_tmf()
to make development/maintenance easier #2343restricted_imputed_dtc_dt()
#2495impute_dtc_dt()
: closed with Create united example for test suite ofderive_vars_dt()
#2400convert_dtc_to_dt()
as necessary and figure out removal of global environment as well #2424derive_vars_dt()
In
test-derive_vars_dtm.R
:same as above but add:
Cleanup/make appropriate additions for:
compute_tmf()
: closed per Clean up documentation on datetime/date flagging functions, e.g.compute_dtf()
/compute_tmf()
to make development/maintenance easier #2343restricted_imputed_dtc_dtm()
impute_dtc_dtm()
convert_dtc_to_dtm()
derive_vars_dtm()
Dreaming...
Beta Was this translation helpful? Give feedback.
All reactions