hierarchical tree traversal change generate test tree and add destory tree