Why are test functions in the definition of weak derivatives required to be $\mathcal{C}^{\infty}$? Recall that a function $u \in L^1_{\text{loc}}(a,b)$ is said to be weakly differentiable with weak derivative $\nu$ if the equation
\begin{align}
    \int_{a}^{b} u(x) \phi'(x) dx
    = - \int_{a}^{b} v(x) \phi(x) dx,
\end{align}
holds for all $\phi \in \mathcal{C}_{\text{c}}^{\infty}(a,b)$.

In understand we why need $\phi$ to be compactly supported but why do we require our test functions $\phi$ to be differentiable infinitely many times?

The definition per se only needs $\phi \in \mathcal{C}^1(a,b)\cap\mathcal{C}[a,b]$, right?
Any help is greatly appreciated.
 A: The definition of a weak derivative comes from a more general setup called the theory of distributions also called theory of generalized functions formalized by the French mathematician Laurent Schwartz in the 1940's.
Let $\Omega$ be an open subset of $\mathbb R^n$. We define the space of distributions $\mathcal D'(\Omega)$ as being the topological dual of the space of test functions $C^\infty_c(\Omega)$. For more details about this topology you can refer to Walter Rudin's Functional Analysis (pp. 151-153). 
For a given distribution $\tau$, its weak i-th derivative $\partial_{x_{i}}\tau$ in the sense of distributions is defined as  $$\begin{equation} \forall \phi  \in C^\infty_c(\Omega) \;\;\langle\partial_{x_{i}}\tau, \phi\rangle \;:= -\langle\tau, \partial_{x_{i}}\phi\rangle \end{equation}$$
To come back to your question, there is a canonical injection of the space $L^1_{loc}(\Omega)\hookrightarrow \mathcal D'(\Omega)$, indeed one can show that $$\langle f,\phi\rangle \;= \int_{\Omega} f\phi$$ for $f \in L^1_{loc}(\Omega)$ is a distribution. Then we define a weak derivative for an $L^1_{loc}(\Omega)$ function as its derivative in the sense of distributions: 
$$\forall \phi \in C^\infty_c(\Omega)\;\; \langle f', \phi\rangle \;:= - \langle f, \phi'\rangle$$ 
Which is also: $$\int_{\Omega} f'\phi = - \int_{\Omega}f\phi'$$
Hope this helps!
Edit: found this great topic: Are weak derivatives and distributional derivatives different?
