Abstract Numerous studies have shown that learned information practiced by testing is better retained than that practiced by restudying (the testing effect). However, results are inconsistent regarding the effect of working memory (WM) capacity on the testing effect. Here, we hypothesize that the effect of WM only emerges when task demands challenge WM capacity. We manipulated WM demands by pretraining 30 undergraduate participants in a multi-session visual search task before an associative learning task involving a test/restudy manipulation. The results revealed that, while participants with higher WM capacity showed a consistent testing effect, the benefit of testing only emerged in participants with lower WM capacity when learning famili...