In my .bashrc I define a function which I can use on the command line later:
.bashrc
function mycommand() { ssh user@123.456.789.0 cd testdir;./test
Reviving an old thread, but this pretty clean approach was not listed.
function mycommand() { ssh user@123.456.789.0 <<+ cd testdir;./test.sh "$1" + }