QA SoftVision Team/Mobile/Writing tests: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 420: Line 420:
* Note that you will need to cast the variable to String in order to print it: String.valueOf(Variable)
* Note that you will need to cast the variable to String in order to print it: String.valueOf(Variable)
= Substituting mSolo.sleep =
= Substituting mSolo.sleep =
* Don't use sleep unless absolutely necessary
* It's ok to use sleep while creating the test but at the end try and substitute it
* Here are some alternatives:
** waitForText(String waitText)
** waitForEnabledText(String waitText)
** blockForEvent/ blockForEventData - gecko event expecters
** waitForCondition
** waitForTest
** waitForPaint
** waitForView(View view)
** waitForView(View view, int timeout, boolean scroll)
** waitForDialogToOpen()
** waitForDialogToClose()
** waitForView(int id)
** waitForView(int id, int minimumNumberOfMatches, int timeout)
** waitForView(int id, int minimumNumberOfMatches, int timeout, boolean scroll)
** waitForActivity(name)
** waitForActivity(Class<? extends Activity> activityClass)
** waitForActivity(Class<? extends Activity> activityClass, int timeout)
= Updating your test directory =
= Updating your test directory =
It is not always necessary to rebuild Fennec to use new tests. If you are updating the build with your own test, ensure that your test has been added to the manifest in /PATH/TO/FENNEC/SOURCE/mobile/android/base/tests/robocop.ini .
It is not always necessary to rebuild Fennec to use new tests. If you are updating the build with your own test, ensure that your test has been added to the manifest in /PATH/TO/FENNEC/SOURCE/mobile/android/base/tests/robocop.ini .
Confirmed users
905

edits

Navigation menu