1. A method, comprising: receiving a test case on a processor, wherein the test case corresponds to a unified test case script, the test case is configured to be run in both a first calling environment and a second calling environment, the first calling environment is a batch environment, the second calling environment is an interactive environment, the test case is configured to execute a REXX statement in the first calling environment, and the test case is configured to enter an entry on a menu in the second calling environment; receiving an input from a user to call the test case in the first calling environment; identifying the first calling environment; setting a first indicator in a memory indicating the first calling environment; running a directive in the test case, wherein the directive calls a subroutine associated with the directive; running the subroutine called by the directive wherein the subroutine includes: receiving from the memory, the first indicator indicating the first calling environment; performing a first task associated with the directive wherein the first task is performed in the first calling environment responsive to receiving the first indicator indicating the first calling environment; and outputting a result of the first task to a user on a display; receiving an input from a user to call the test case in the second calling environment; identifying the second calling environment; setting a second indicator in the memory indicating the second calling environment; running the directive in the test case, wherein the directive calls the subroutine associated with the directive; and running the subroutine called by the directive wherein the subroutine further includes: receiving from the memory the second indicator indicating the second calling environment; and performing a second task associated with the directive wherein the second task is performed in the second calling environment responsive to receiving the second indicator indicating the second calling environment, wherein the first task comprises executing the REXX statement in the first calling environment, and the second task comprises entering the entry on the menu in the second calling environment.