diff --git a/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyAction.java b/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyAction.java index 1b957d47..ff8b7973 100644 --- a/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyAction.java +++ b/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyAction.java @@ -46,6 +46,9 @@ public String getSummary() { case UnrecognisedFormat: description = Messages.MONKEY_RESULT_UNRECOGNISED(); break; + case NoActivityFound: + description = Messages.MONKEY_RESULT_NOACTIVITYFOUND(); + break; case NothingToParse: default: description = Messages.MONKEY_RESULT_NONE(); diff --git a/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyRecorder.java b/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyRecorder.java index 79be934a..00b224e2 100644 --- a/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyRecorder.java +++ b/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyRecorder.java @@ -116,6 +116,9 @@ static MonkeyAction parseMonkeyOutput(AbstractBuild build, PrintStream log } else if ("NOT RESPONDING".equals(reason)) { result = MonkeyResult.AppNotResponding; } + // Case for "** No activities found to run, monkey aborted." + } else if (monkeyOutput.contains("No activities found to run")) { + result = MonkeyResult.NoActivityFound; } // Set configured build result diff --git a/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyResult.java b/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyResult.java index af5fbc1b..c49a4e80 100644 --- a/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyResult.java +++ b/src/main/java/hudson/plugins/android_emulator/monkey/MonkeyResult.java @@ -10,5 +10,7 @@ enum MonkeyResult { /** No monkey output was found to parse */ NothingToParse, /** Monkey output was given, but outcome couldn't be determined */ - UnrecognisedFormat + UnrecognisedFormat, + /** ** No activities found to run, monkey aborted. Package name is wrong or package not installed */ + NoActivityFound } diff --git a/src/main/resources/hudson/plugins/android_emulator/Messages.properties b/src/main/resources/hudson/plugins/android_emulator/Messages.properties index e7c4f215..75d6b672 100644 --- a/src/main/resources/hudson/plugins/android_emulator/Messages.properties +++ b/src/main/resources/hudson/plugins/android_emulator/Messages.properties @@ -150,6 +150,7 @@ MONKEY_RESULT_SUCCESS=Succeeded after {0} events MONKEY_RESULT_CRASH=Crashed after {0} of {1} events MONKEY_RESULT_ANR=Stopped responding after {0} of {1} events MONKEY_RESULT_UNRECOGNISED=Could not determine results from file +MONKEY_RESULT_NOACTIVITYFOUND=No activities found to run (Package not installed or Wrong Package Id) MONKEY_RESULT_NONE=No monkey output was provided BUILD_RESULT_UNSTABLE=Unstable BUILD_RESULT_FAILURE=Failure