Robotium How to test with background Services like conversion?

0
0

I am using Robotium Recorder to test my app. My problem is in my app i am doing audio conversions in background which take some time based on how much time user is recording.

Example

If i am running a test which records for 10mins (Converts in background) each time like this 10 times it records so when my last recording that is 10th recording finishes robotium exits and kill the app.

**Problem:- For last recording my file still need to convert its converting in background (Service) but app is killed so converting failed. I cannot use solo.sleep(int) because i dont know how much time it will take to convert **

  • You must to post comments
0
0

You can use solo.waitForCondition()

final int TIMEOUT = 5000;
Assert.assertTrue(solo.waitForCondition(new Condition() {
@Override
public boolean isSatisfied() {
// return true if the file has been converted.
}
}, TIMEOUT));
  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website