The effects of surface roughness on a spatially developing turbulent boundary layer were investigated by comparing direct numerical simulations over rough and smooth walls. The Reynolds number based on the momentum thickness is Reθ≈300~1400. The roughness is composed of periodically arranged two-dimensional spanwise rods and roughness height is k=1.5θin, which corresponds to k/δ≈0.045~0.125. Using very large domain along the streamwise direction, spatially developing characteristics of roughness effects in the outer layer are observed. Along the downstream, the wall friction velocity approaches to a constant value and the similarity profiles of turbulent stresses could be obtained. The roughness effects of turbulent stresses in the outer layer were more pronounced along the downstream. This investigation shows that the roughness effects on turbulent stresses are not restricted to the roughness sublayer but are felt throughout the boundary layer.