an algorithm for detecting if noisy univariate data is constant or is sum of step functions
Every possible observation is consistent with a sum of step functions: one can use one step function per data point and fit any possible sequence of observations.  So, the question is not well-posed.  You'll probably need to impose some kind of restriction or prior on the set of sum-of-step functions you're willing to accept (e.g., a sum of at most 3 step functions).  

If you make the question well-defined, it might be answerable  in a principled way using maximum likelihood.  Let $\mathcal{H}_0$ denote the set of constant functions, and $\mathcal{H}_1$ the set of sum-of-step functions you are willing to accept (e.g., with a limit on the number of step functions you're summing).  Let $\vec{x}$ denote the observed data.  Fix a probabilistic noise model.  Let $L(f)$ denote the likelihood of function $f$, i.e., the probability of observing $\vec{x}$ given that the true underlying function is $f$.  Let $L(\mathcal{H}_0) = \max \{L(f) \mid f \in \mathcal{H}_0\}$ and $L(\mathcal{H}_1) = \max \{L(f) \mid f \in \mathcal{H}_1\}$.  Then a maximum-likelihood decision rule would be: infer that the underlying data is constant if $L(\mathcal{H}_0) \ge L(\mathcal{H}_1)$, otherwise infer that the underlying data is a sum of step functions.

To implement this, you'll need an algorithm to compute $L(\mathcal{H}_0)$ and $L(\mathcal{H}_1)$, which will in turn depend on the noise model.  Computing $L(\mathcal{H}_0)$ is likely to be straightforward for reasonable noise models; e.g., if you assume iid Gaussian noise, then $L(\mathcal{H}_0)$ amounts to computing the average of the data points, choosing a constant function that is always equal to that average, and computing its likelihood.  Computing $L(\mathcal{H}_1)$ (assuming you have a restriction on the number of step functions you'll accept) is a little trickier but is doable using dynamic programming.

From a pragmatic perspective, you might also be interested in changepoint detection.