Bug 1227367 - Detect empty test suite in BaseMarionetteTestRunner; r=automatedtester
If the appropriate test_handler isn't available to the runner,
tests specified at the command-line silently omitted. It's possible
for the runner to create an empty test-suite. This patch adds
asserts to detect an empty test-suite early and provide a more
specific error message.
MozReview-Commit-ID: 5XL4XZHCbMu
--- a/testing/marionette/harness/marionette/runner/base.py
+++ b/testing/marionette/harness/marionette/runner/base.py
@@ -830,16 +830,18 @@ setReq.onsuccess = function() {
setReq.onerror = function() {
marionetteScriptFinished(false);
}""", script_timeout=60000)
if not result:
raise Exception("Could not launch test container app")
def run_tests(self, tests):
+ assert len(tests) > 0
+ assert len(self.test_handlers) > 0
self.reset_test_stats()
self.start_time = time.time()
need_external_ip = True
if not self.marionette:
self.start_marionette()
# if we're working against a desktop version, we usually don't need
# an external ip