fix installApp name conflict and add tests (fix #3030)