We analyze the optimal design of a pumping test for estimating hydrogeologic parameters that are subsequently used to predict stream depletion caused by groundwater pumping in a leaky aquifer. A global optimization method is used to identify the test’s optimal duration and the number and locations of observation wells. The objective is to minimize predictive uncertainty (variance) of the estimated stream depletion, which depends on the sensitivities of depletion and drawdown to relevant hydrogeologic parameters. The sensitivities are computed analytically from the solutions of Zlotnik and Tartakovsky (2008) and the results are presented in a dimensionless form, facilitating their use for planning of pumping test at a variety of sites with similar hydrogeological settings. We show that stream depletion is generally very sensitive to aquitard’s leakage coefficient and stream-bed’s conductance. The optimal number of observation wells is two, their optimal locations are one close to the stream and the other close to the pumping well. We also provide guidelines on the test’s optimal duration and demonstrate that under certain conditions estimation of aquitard’s leakage coefficient and stream-bed’s conductance requires unrealistic test duration and/or signal-to-noise ratio.