In this review, we outline the expected tests of gravity that will be achieved at cosmological scales in the upcoming decades. We focus mainly on constraints on phenomenologically parameterized deviations from general relativity, which allow to test gravity in a model-independent way, but also review some of the expected constraints obtained with more physically motivated approaches. After reviewing the state-of-the-art for such constraints, we outline the expected improvement that future cosmological surveys will achieve, focusing mainly on future large-scale structures and cosmic microwave background surveys but also looking into novel probes on the nature of gravity. We will also highlight the necessity of overcoming accuracy issues in our theoretical predictions, issues that become relevant due to the expected sensitivity of future experiments.