Last active
December 28, 2015 19:09
-
-
Save corsc/7547846 to your computer and use it in GitHub Desktop.
Simple Robotium Sanity Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Verify that clicking the button shows a toast with "Ouch" | |
*/ | |
public void testOnClickMe() | |
{ | |
final Solo solo = this.getSolo(); | |
// click the button | |
solo.clickOnButton(this.getContext().getString(R.string.main_click_me)); | |
// verify the toast shows | |
solo.searchText(this.getContext().getString(R.string.main_ouch), true); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple sanity test to check that content is displayed | |
*/ | |
public void testSanity() | |
{ | |
final Solo solo = this.getSolo(); | |
// check for "Hello world" | |
assertTrue(solo.searchText(this.getContext().getString(R.string.main_hello_world), true)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment