Before revision:  In particular, we study tests of randomness (i.e., that trials are i.i.d.) which choose as test statistics (i) the difference between the proportions of successes that directly follow k consecutive successes and k consecutive failures or (ii) the difference between the proportion of successes following k consecutive successes and the proportion of successes . The asymptotic distributions of these test statistics and their permutation distributions are derived under randomness and under general models of streakiness, which allows us to evaluate their local asymptotic power.
After revision:  In particular, we study tests of randomness (i.e., that trials are i.i.d.) which choose as test statistics (i) the difference between the proportions of successes that directly follow k consecutive successes and k consecutive failures or (ii) the difference between the proportion of successes following k consecutive successes and the proportion of successes that directly follow k consecutive failures. We derive the asymptotic distributions of these test statistics and their permutation distributions are derived under randomness and under general models of streakiness, which allows us to evaluate their local asymptotic power.