common scripting utils for testing