Android Test Project Directory Structure When Using Eclipse?

I've been creating test projects with Eclipse 3.6.2 inside my main project just like you describe for command line tools ( MyProject and MyProject/test are Android projects that both contain a src folder). You can create this test project using the New Android Test Project by deselecting "Default Location" and setting the path.

I've been creating test projects with Eclipse 3.6.2 inside my main project just like you describe for command line tools (MyProject and MyProject/test are Android projects that both contain a src folder). You can create this test project using the New Android Test Project by deselecting "Default Location" and setting the path. None of my projects are very large, but the only problem I've had so far is that you cannot use the MyProject/test folder under the MyProject project.To be able to right click and run as a test case, you have to access files directly from the MyProjectTest project.

To prevent you from having problems, you can add a Resource Filter to hide the test folder in Project Properties > Resource > Resource Filters. However, preliminary research suggests that Eclipse does not support sub-projects (i.e. , one Eclipse project having another Eclipse project in a subdirectory).

What problems have you seen?

" -- I imported an Android project, saw that it did not recognize the test project, then elected to do some research online. Every post I came up with, including bug reports on eclipse.Org, indicated that projects-within-projects aren't supported. I figured I'd start soliciting Android-specific advice at that point.

Later today, I'll experiment with your structure -- the resource filters in particular will be useful to minimize confusion. I'll swing back and accept your answer if I can get this working. Many thanks!

– CommonsWare Jul 5 at 10:39 1 Couple of follow-up notes here. The Resource Filters option might be new to 3.6; I'm on 3.5.2 and do not see it. Also, it looks like you can't create test projects from existing source the way you can regular Android projects, which is mildly annoying.

I wound up renaming my tests/ directory, creating a new test project there, and moving the test case source code back into position. But, that at least appears to be working. Thanks!

– CommonsWare Jul 5 at 22:37.

Depends on your toolset: ADT >= v12 currently has flaky support for "a project within a project": Creating an Android JUnit Test project in Eclipse I have tried separate testproject, and separate test directory, but afaik "a project within a project" approach seems to be the way of the future. This is becuase AndroidManifest. Xml merging into the test project AndroidManifest.

Xml, is in the pipeline for the next ADT releases.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions