When will an artificial intelligence replace a software developer or tester?
The ultimate goal of machine learning is to bypass the developer...
When we will have a "master algorithm" that can learn how to generalize any function or algorithm from examples, it can essentially replace any developer, skip the 'development" stage, going from problem directly to algorithm. 

We can't know when this will happen, but as we surrounded with multiple creatures (humans and animals) which can demonstrate learning algorithms and predictive model learning without any "developer" - we can assume that such an algorithm is possible. 

If I would have to guess, I would say that we are probably very near the point where "developers" and "testers" will be replaced by learning algorithms. We could be a decade or two away from the point where people will not write any code or any testing at all. Programs and automation will be derived directly from describing the problems themselves in a natural language, visualizations or data collections. However, we still need some breakthroughs in combining feature learning with active memory, unsupervised learning, and artificial common sense.