These instructions are for running the tests in Eclipse. There's no need to run a device or emulator.
-
Install Robolectric.
-
Import these three RestClient projects into Eclipse. Refer to the Robolectric install instructions to fix up any project dependency issues that occur.
- The RestClient SDK library project in the top level folder.
- The RestClientExampleApp project in the example-app folder.
- The RestClientTest project in the example-app/test-app folder.
-
The tests use Sinatra as a local test server.
gem install sinatra json
-
Start the test server by cd'ing to example-app/test-app/sinatra folder and run
ruby robolectric.rb
-
In Eclipse, select the RestClientTest project and "Run As" => "JUnit Test"