Across 3 experiments, we investigated the factors that dictate when taking a test improves subsequent memory performance (the testing effect). In Experiment 1, participants retrieving a set of targets during a retrieval practice phase ultimately recalled fewer of those targets compared with a group of participants who studied the targets twice, a negative testing effect. In Experiments 2 and 3, theoretically motivated modifications to the basic design of Experiment 1 reversed this pattern, demonstrating the more typical positive testing effect. The results from all 3 experiments were predicted by the multifactor account, an explanatory account applied to the generation effect (improved memory for self-generated material), which details why generation typically improves memory, as well as those conditions under which generation can impair memory performance. These results suggest the testing effect and the generation effect may be understood within a common framework.