Well, that depends on whether these two programs work together or one after the other.
If test1 does something and test2 doesn't need the output from test1, just put them in a file like this:
1 2 3
test1
test2
On the other hand, it test2 need the output of test 1, something like this might be the answer:
1 2 3
test 1 | test2
You didn't say what shell you're using; however, this should work in all of the popular shells (ksh, sh, c, bash, etc.) Also, don't forget to change the modes on your shell script (chmod 744 myscript, for example.)