Setting up test project - lagecamp/CMPUT301W13T02 GitHub Wiki

Update -- April, 1st

  • Use Run As... | Android JUnit
  • If it doesn't work, right click the project, go to Properties. In the tab Libraries, remove JUnit 4 and add JUnit 3. I think those are the only changes you guys need to make in case it does not work.

Old Version

LIST OF STEPS TO MAKE THE TEST PROJECT WORK:

(I had to go through all those steps to make the test project work in my computer, so if you guys face an issue...)

  • I tried to import the project in my computer the way I had done before and it didn't work, so I did the following:
  1. Pull the latest version of the code

  2. Go to Window | Show View | Other and then select Git Repositories

  3. In Git Repositories view, go to the repository, and then go to Working Directory

  4. Right-click RecipeFinderTests and choose Import Projects...

  5. Follow the instructions

  • To run the project:
  1. Right-click the project, go to Run As... | JUnit Test

  2. If it prompts for how you want to run it, choose Eclipse JUnit

  • For some reason, the project didn't work after I imported it, so I did the following (I hope the same thing doesn't happen to you guys):
  1. Right-click the project, go to Run As... | Run Configurations

  2. Go to Classpath

  3. Remove Android SDK

  4. Click Bootstrap entries

  5. Go to Advanced... (in the right) and then Add Library. Select JUnit and then choose JUnit 4

  6. Do the same thing to add JRE System Library

  7. Save the changes and try to run again

  8. If it still doesn't run, go to Project | Clean and then right-click the project, go to Android Tools and then Fix Project Properties...