support test env

Added support to test environment. it's useful for me, so maybe for others too.