Saturday, July 03, 2010

Android UI Test note

If you are using the ant script to run the ui tests, that script only detects changes in the java code in the target and test project. The R resource file is somehow not included. If you make any change to the layout which requires some change in the R file (your IDE might be able to help you with that), if you then immediately run a simple "ant run-tests", you might get some weird error. It seems that the new layout file has taken effect while the R file has not. In this case, you need to run a "ant clean compile" in your target project and then "ant clean run-tests" in your ui test project.