the call itself is right, and when you have a "myTestJavascriptFunction" Javascript function defined anywhere (it doesn't matter if it is in an included .js file or inside the html) it should work...
...but as note - when testing the javascript interface locally - then the flash must be in a trusted folder (see here), otherwise the javascript interface will not work (there will be a warning in the krpano log - external interface not available),