added test environment support