Testbench quality improvement: Refactoring tests

First step to refactoring tests is to review tests to identify the possible reductions. Reduce the number of tests to provide the necessary coverage. This is…

First step to refactoring tests is to review tests to identify the possible reductions. Reduce the number of tests to provide the necessary coverage. This is not going to provide immediate verification coverage increase but this opportunity to set things right for future maintenance. Any opportunity to group related tests to reduce the code redundancy should be spotted.

Sometimes to update single additional scenario multiple related tests have to updated individually since they are kept separate. If two tests have greater than 60 % code same then it should merged. Tests that are no longer valid might still be running eliminate them. Tests might be running for the configurations and feature combinations that are no longer valid , eliminate them as well.

Additionally part of refactoring reviews should spot tests that are not meeting their intent called out in the test plan. For large verification projects this is a big challenge. Selective reviews should be conducted around the areas where bugs are being discovered, tests which have frequent false failures or tests that have been passing for very long time or the ones complained by designers and verification engineers. These are some of the ideas basically review process needs to be come up with smart criterias to maximize the return on review.

Maintaining regression history can be very helpful in helping identify the tests to be reviewed. Again bulk of the cleaning can be completed but periodic such audits and reviews have to be conducted to maintain it in the same form.

Similar Posts

Leave a Reply