зеркало из https://github.com/mozilla/eideticker.git
Bug 1040708 - Use the preset workloads defined in b2gpopulate
Use preset WORKLOAD values defined in b2gpopulate WORKLOADS instead of the 'magic' numbers in the tests
This commit is contained in:
Родитель
52ea2488ee
Коммит
254fa7277e
|
@ -7,6 +7,8 @@ from marionette import expected
|
|||
from marionette import Wait
|
||||
from marionette.by import By
|
||||
|
||||
from b2gpopulate import WORKLOADS
|
||||
|
||||
|
||||
class B2GContactsTestMixin(object):
|
||||
|
||||
|
@ -17,7 +19,8 @@ class B2GContactsTestMixin(object):
|
|||
|
||||
def populate_databases(self):
|
||||
self.device.b2gpopulate.populate_contacts(
|
||||
200, include_pictures=False, restart=False)
|
||||
WORKLOADS['light']['contact'],
|
||||
include_pictures=False, restart=False)
|
||||
|
||||
def prepare_app(self):
|
||||
self.launch_app()
|
||||
|
@ -61,7 +64,9 @@ class B2GMessagesTestMixin(object):
|
|||
self.launch_app()
|
||||
|
||||
def populate_databases(self):
|
||||
self.device.b2gpopulate.populate_messages(200, restart=False)
|
||||
self.device.b2gpopulate.populate_messages(
|
||||
WORKLOADS['light']['message'],
|
||||
restart=False)
|
||||
|
||||
def wait_for_content_ready(self):
|
||||
# the 200 message workload contains 37 threads (36 on v1.3)
|
||||
|
|
|
@ -7,9 +7,11 @@ from marionette import expected
|
|||
|
||||
from eideticker.test import B2GAppStartupTest
|
||||
|
||||
from b2gpopulate import WORKLOADS
|
||||
|
||||
|
||||
class Test(B2GAppStartupTest):
|
||||
picture_count = 100
|
||||
picture_count = WORKLOADS['heavy']['picture']
|
||||
|
||||
def prepare_app(self):
|
||||
self.device.b2gpopulate.populate_pictures(self.picture_count)
|
||||
|
|
|
@ -7,11 +7,13 @@ from marionette import expected
|
|||
|
||||
from eideticker.test import B2GAppStartupTest
|
||||
|
||||
from b2gpopulate import WORKLOADS
|
||||
|
||||
|
||||
class Test(B2GAppStartupTest):
|
||||
|
||||
def prepare_app(self):
|
||||
music_count = 100
|
||||
music_count = WORKLOADS['heavy']['music']
|
||||
tracks_per_album = 10
|
||||
self.device.b2gpopulate.populate_music(
|
||||
music_count, tracks_per_album=tracks_per_album)
|
||||
|
|
|
@ -4,6 +4,8 @@ from gaiatest.apps.phone.app import Phone
|
|||
|
||||
from eideticker.test import B2GAppActionTest
|
||||
|
||||
from b2gpopulate import WORKLOADS
|
||||
|
||||
|
||||
class Test(B2GAppActionTest):
|
||||
|
||||
|
@ -12,7 +14,8 @@ class Test(B2GAppActionTest):
|
|||
self.scrolldown_amount = int(testinfo.get('scrolldown_amount'))
|
||||
|
||||
def populate_databases(self):
|
||||
self.device.b2gpopulate.populate_calls(100, restart=False)
|
||||
self.device.b2gpopulate.populate_calls(
|
||||
WORKLOADS['medium']['call'], restart=False)
|
||||
|
||||
def launch_app(self):
|
||||
phone = Phone(self.device.marionette)
|
||||
|
|
Загрузка…
Ссылка в новой задаче