Add RunContext test helpers (Fix #498)

Followup complete implementation of the ideas presented in issue #498.