Jordan and I ran across a configuration issue last week.
Search.openmrs.org shows others have run into the same issue. I'm posting the solution here so it's easier for the next person to find.
Symptoms: We added a test folder and test cases to the omod, following the same conventions used in the api project. When trying to run the Generate Test Case plugin, it gave an error of "the view that generated the event is unknown". We wrote a test class by hand. "mvn test" gave an error, something about source directories.
Solution:
1) We recreated the omod src/test/java directory. In Eclipse, in the Package Explorer area (the left column, by default), right-click the YourModuleName-omod project. Select "build path", then "new source folder". Create the src/test/java folder. This will ensure the folder appears when you ....
2) Configure the Generate Test Case plugin. In the Eclipse Package Explorer, right click the YourModuleName-omod project. Select "Properties". Find the Generate Test Cases item and click on it. In the configuration pane on the right, set the source folder to src/main/java and test folder to src/test/java . Save the changes.
Right-click on the java file to be tested and select Generate Test Cases. You should be shown a dialog and a checklist of method names.
Janet