Find unused code in a Rails app

后端 未结 11 1518
南方客
南方客 2020-12-01 02:35

How do I find what code is and isn\'t being run in production ?

The app is well-tested, but there\'s a lot of tests that test unused code.

11条回答
  •  孤街浪徒
    2020-12-01 03:19

    Have you tried creating a test suite using something like sahi you could then record all your user journies using this and tie those tests to rcov or something similar.

    You do have to ensure you have all user journies but after that you can look at what rcov spits out and at least start to prune out stuff that is obviously never covered.

提交回复
热议问题