Package wyz.code.testthat aims to generate testthat test cases from recorded unit tests.
Read Offensive programming book to get introduction and advanced knowledge on the topic.