{"action":"created","comment":{"url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/comments/76238214","id":76238214,"diff_hunk":"@@ -0,0 +1,125 @@\n+#    Copyright 2014-2016 ARM Limited\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+#\n+\n+import os\n+import logging\n+import re\n+import time\n+\n+from wlauto import AndroidUiAutoBenchmark, Parameter\n+from wlauto.exceptions import WorkloadError\n+\n+__version__ = '0.1.1'\n+\n+\n+class Youtube(AndroidUiAutoBenchmark):\n+\n+    name = 'youtube'\n+    package = 'com.google.android.youtube'\n+    activity = ''\n+    description = '''\n+    A workload to perform standard productivity tasks within YouTube.\n+\n+    The workload plays a pre-defined video from the Watch Later playlist in different video\n+    quality bitrates.  It also seeks to a pre-defined position, pauses and restarts playback.\n+\n+    Test description:\n+    1. The workload has 4 test scenarios, determined by the ``video_source`` parameter in\n+       the agenda file. These are ``home``, ``my_videos``, ``search``, and ``trending``.\n+       - A. home - Scrolls down once on the app's home page, then select and plays the video\n+            that appears at the top of the list.\n+       - B. my_videos - Goes to the 'My Videos' section of the user's account page and plays a\n+            video from there. The user must have at least one uploaded video for this to work.\n+       - C. search - Goes to the search view and search a specific term, then plays the first\n+            video in the search results is played. The parameter ``search_term`` must also be\n+            provided in the agenda for this to work.\n+       - D. trending - Goes to the 'Trending Videos' section of the app, and plays the first\n+            video in the trending videos list.\n+       For each scenario, the subsequent test steps are performed.\n+    2. Navigating to the general app settings page to disable autoplay.\n+    3. Jumping forward in the video by touching the video seek bar and letting the video play\n+       for a few seconds.\n+    4. Expanding the info card that shows video metadata, then collapsing it again.\n+    5. Scrolling down to the end of related videos and comments under the info card, and then\n+       back up to the beginning. A maximum of 5 swipe actions is performed in either direction.\n+    '''\n+\n+    parameters = [\n+        Parameter('dumpsys_enabled', kind=bool, default=True,\n+                  description='''\n+                  If ``True``, dumpsys captures will be carried out during the\n+                  test run.  The output is piped to log files which are then\n+                  pulled from the phone.\n+                  '''),\n+        Parameter('video_source', kind=str, default='search',\n+                  allowed_values=['home', 'my_videos', 'search', 'trending'],\n+                  description='''\n+                  Determines where to play the video from. This can either be from the\n+                  YouTube home, my videos section, trending videos or found in search.\n+                  '''),\n+        Parameter('search_term', kind=str, default='Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film',\n+                  description='''\n+                  The search term to use when ``video_source`` is set to ``search``.\n+                  Not applicable otherwise.\n+                  '''),\n+    ]\n+\n+    view = package + '/com.google.android.apps.youtube.app.WatchWhileActivity'\n+\n+    instrumentation_log = name + '_instrumentation.log'\n+\n+    def __init__(self, device, **kwargs):\n+        super(Youtube, self).__init__(device, **kwargs)\n+        self.run_timeout = 300\n+        self.output_file = os.path.join(self.device.working_directory, self.instrumentation_log)\n+\n+    def validate(self):\n+        super(Youtube, self).validate()\n+        self.uiauto_params['package'] = self.package","path":"wlauto/workloads/youtube/__init__.py","position":90,"original_position":90,"commit_id":"1c69396bc5e2d108602517afd313878be4bb7da6","original_commit_id":"1c69396bc5e2d108602517afd313878be4bb7da6","user":{"login":"muendelezaji","id":1127221,"avatar_url":"https://avatars.githubusercontent.com/u/1127221?v=3","gravatar_id":"","url":"https://api.github.com/users/muendelezaji","html_url":"https://github.com/muendelezaji","followers_url":"https://api.github.com/users/muendelezaji/followers","following_url":"https://api.github.com/users/muendelezaji/following{/other_user}","gists_url":"https://api.github.com/users/muendelezaji/gists{/gist_id}","starred_url":"https://api.github.com/users/muendelezaji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muendelezaji/subscriptions","organizations_url":"https://api.github.com/users/muendelezaji/orgs","repos_url":"https://api.github.com/users/muendelezaji/repos","events_url":"https://api.github.com/users/muendelezaji/events{/privacy}","received_events_url":"https://api.github.com/users/muendelezaji/received_events","type":"User","site_admin":false},"body":"This is moving to the superclass now","created_at":"2016-08-25T13:05:19Z","updated_at":"2016-08-25T13:05:19Z","html_url":"https://github.com/ARM-software/workload-automation/pull/227#discussion_r76238214","pull_request_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/227","_links":{"self":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/comments/76238214"},"html":{"href":"https://github.com/ARM-software/workload-automation/pull/227#discussion_r76238214"},"pull_request":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/227"}}},"pull_request":{"url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/227","id":82688111,"html_url":"https://github.com/ARM-software/workload-automation/pull/227","diff_url":"https://github.com/ARM-software/workload-automation/pull/227.diff","patch_url":"https://github.com/ARM-software/workload-automation/pull/227.patch","issue_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/227","number":227,"state":"open","locked":false,"title":"Add Youtube workload","user":{"login":"muendelezaji","id":1127221,"avatar_url":"https://avatars.githubusercontent.com/u/1127221?v=3","gravatar_id":"","url":"https://api.github.com/users/muendelezaji","html_url":"https://github.com/muendelezaji","followers_url":"https://api.github.com/users/muendelezaji/followers","following_url":"https://api.github.com/users/muendelezaji/following{/other_user}","gists_url":"https://api.github.com/users/muendelezaji/gists{/gist_id}","starred_url":"https://api.github.com/users/muendelezaji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muendelezaji/subscriptions","organizations_url":"https://api.github.com/users/muendelezaji/orgs","repos_url":"https://api.github.com/users/muendelezaji/repos","events_url":"https://api.github.com/users/muendelezaji/events{/privacy}","received_events_url":"https://api.github.com/users/muendelezaji/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-25T09:43:46Z","updated_at":"2016-08-25T13:05:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8e88b3cf2e1cdc1240f230998edc8f853c777e5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/227/commits","review_comments_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/227/comments","review_comment_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/227/comments","statuses_url":"https://api.github.com/repos/ARM-software/workload-automation/statuses/1c69396bc5e2d108602517afd313878be4bb7da6","head":{"label":"jimboatarm:upstream-youtube","ref":"upstream-youtube","sha":"1c69396bc5e2d108602517afd313878be4bb7da6","user":{"login":"jimboatarm","id":18032086,"avatar_url":"https://avatars.githubusercontent.com/u/18032086?v=3","gravatar_id":"","url":"https://api.github.com/users/jimboatarm","html_url":"https://github.com/jimboatarm","followers_url":"https://api.github.com/users/jimboatarm/followers","following_url":"https://api.github.com/users/jimboatarm/following{/other_user}","gists_url":"https://api.github.com/users/jimboatarm/gists{/gist_id}","starred_url":"https://api.github.com/users/jimboatarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimboatarm/subscriptions","organizations_url":"https://api.github.com/users/jimboatarm/orgs","repos_url":"https://api.github.com/users/jimboatarm/repos","events_url":"https://api.github.com/users/jimboatarm/events{/privacy}","received_events_url":"https://api.github.com/users/jimboatarm/received_events","type":"User","site_admin":false},"repo":{"id":55431582,"name":"workload-automation","full_name":"jimboatarm/workload-automation","owner":{"login":"jimboatarm","id":18032086,"avatar_url":"https://avatars.githubusercontent.com/u/18032086?v=3","gravatar_id":"","url":"https://api.github.com/users/jimboatarm","html_url":"https://github.com/jimboatarm","followers_url":"https://api.github.com/users/jimboatarm/followers","following_url":"https://api.github.com/users/jimboatarm/following{/other_user}","gists_url":"https://api.github.com/users/jimboatarm/gists{/gist_id}","starred_url":"https://api.github.com/users/jimboatarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimboatarm/subscriptions","organizations_url":"https://api.github.com/users/jimboatarm/orgs","repos_url":"https://api.github.com/users/jimboatarm/repos","events_url":"https://api.github.com/users/jimboatarm/events{/privacy}","received_events_url":"https://api.github.com/users/jimboatarm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jimboatarm/workload-automation","description":"A framework for automating workload execution and measurement collection on ARM devices.","fork":true,"url":"https://api.github.com/repos/jimboatarm/workload-automation","forks_url":"https://api.github.com/repos/jimboatarm/workload-automation/forks","keys_url":"https://api.github.com/repos/jimboatarm/workload-automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimboatarm/workload-automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimboatarm/workload-automation/teams","hooks_url":"https://api.github.com/repos/jimboatarm/workload-automation/hooks","issue_events_url":"https://api.github.com/repos/jimboatarm/workload-automation/issues/events{/number}","events_url":"https://api.github.com/repos/jimboatarm/workload-automation/events","assignees_url":"https://api.github.com/repos/jimboatarm/workload-automation/assignees{/user}","branches_url":"https://api.github.com/repos/jimboatarm/workload-automation/branches{/branch}","tags_url":"https://api.github.com/repos/jimboatarm/workload-automation/tags","blobs_url":"https://api.github.com/repos/jimboatarm/workload-automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimboatarm/workload-automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimboatarm/workload-automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimboatarm/workload-automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimboatarm/workload-automation/statuses/{sha}","languages_url":"https://api.github.com/repos/jimboatarm/workload-automation/languages","stargazers_url":"https://api.github.com/repos/jimboatarm/workload-automation/stargazers","contributors_url":"https://api.github.com/repos/jimboatarm/workload-automation/contributors","subscribers_url":"https://api.github.com/repos/jimboatarm/workload-automation/subscribers","subscription_url":"https://api.github.com/repos/jimboatarm/workload-automation/subscription","commits_url":"https://api.github.com/repos/jimboatarm/workload-automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimboatarm/workload-automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimboatarm/workload-automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimboatarm/workload-automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimboatarm/workload-automation/contents/{+path}","compare_url":"https://api.github.com/repos/jimboatarm/workload-automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimboatarm/workload-automation/merges","archive_url":"https://api.github.com/repos/jimboatarm/workload-automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimboatarm/workload-automation/downloads","issues_url":"https://api.github.com/repos/jimboatarm/workload-automation/issues{/number}","pulls_url":"https://api.github.com/repos/jimboatarm/workload-automation/pulls{/number}","milestones_url":"https://api.github.com/repos/jimboatarm/workload-automation/milestones{/number}","notifications_url":"https://api.github.com/repos/jimboatarm/workload-automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimboatarm/workload-automation/labels{/name}","releases_url":"https://api.github.com/repos/jimboatarm/workload-automation/releases{/id}","deployments_url":"https://api.github.com/repos/jimboatarm/workload-automation/deployments","created_at":"2016-04-04T17:37:53Z","updated_at":"2016-06-23T12:38:13Z","pushed_at":"2016-08-25T10:20:28Z","git_url":"git://github.com/jimboatarm/workload-automation.git","ssh_url":"git@github.com:jimboatarm/workload-automation.git","clone_url":"https://github.com/jimboatarm/workload-automation.git","svn_url":"https://github.com/jimboatarm/workload-automation","homepage":null,"size":50797,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":2,"default_branch":"master"}},"base":{"label":"ARM-software:master","ref":"master","sha":"3782a33060f6c3de6a8d8dc07d8d9cc7bd57bdae","user":{"login":"ARM-software","id":5690313,"avatar_url":"https://avatars.githubusercontent.com/u/5690313?v=3","gravatar_id":"","url":"https://api.github.com/users/ARM-software","html_url":"https://github.com/ARM-software","followers_url":"https://api.github.com/users/ARM-software/followers","following_url":"https://api.github.com/users/ARM-software/following{/other_user}","gists_url":"https://api.github.com/users/ARM-software/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-software/subscriptions","organizations_url":"https://api.github.com/users/ARM-software/orgs","repos_url":"https://api.github.com/users/ARM-software/repos","events_url":"https://api.github.com/users/ARM-software/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-software/received_events","type":"Organization","site_admin":false},"repo":{"id":31957801,"name":"workload-automation","full_name":"ARM-software/workload-automation","owner":{"login":"ARM-software","id":5690313,"avatar_url":"https://avatars.githubusercontent.com/u/5690313?v=3","gravatar_id":"","url":"https://api.github.com/users/ARM-software","html_url":"https://github.com/ARM-software","followers_url":"https://api.github.com/users/ARM-software/followers","following_url":"https://api.github.com/users/ARM-software/following{/other_user}","gists_url":"https://api.github.com/users/ARM-software/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-software/subscriptions","organizations_url":"https://api.github.com/users/ARM-software/orgs","repos_url":"https://api.github.com/users/ARM-software/repos","events_url":"https://api.github.com/users/ARM-software/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-software/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARM-software/workload-automation","description":"A framework for automating workload execution and measurement collection on ARM devices.","fork":false,"url":"https://api.github.com/repos/ARM-software/workload-automation","forks_url":"https://api.github.com/repos/ARM-software/workload-automation/forks","keys_url":"https://api.github.com/repos/ARM-software/workload-automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARM-software/workload-automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARM-software/workload-automation/teams","hooks_url":"https://api.github.com/repos/ARM-software/workload-automation/hooks","issue_events_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/events{/number}","events_url":"https://api.github.com/repos/ARM-software/workload-automation/events","assignees_url":"https://api.github.com/repos/ARM-software/workload-automation/assignees{/user}","branches_url":"https://api.github.com/repos/ARM-software/workload-automation/branches{/branch}","tags_url":"https://api.github.com/repos/ARM-software/workload-automation/tags","blobs_url":"https://api.github.com/repos/ARM-software/workload-automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARM-software/workload-automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARM-software/workload-automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARM-software/workload-automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARM-software/workload-automation/statuses/{sha}","languages_url":"https://api.github.com/repos/ARM-software/workload-automation/languages","stargazers_url":"https://api.github.com/repos/ARM-software/workload-automation/stargazers","contributors_url":"https://api.github.com/repos/ARM-software/workload-automation/contributors","subscribers_url":"https://api.github.com/repos/ARM-software/workload-automation/subscribers","subscription_url":"https://api.github.com/repos/ARM-software/workload-automation/subscription","commits_url":"https://api.github.com/repos/ARM-software/workload-automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARM-software/workload-automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARM-software/workload-automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARM-software/workload-automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARM-software/workload-automation/contents/{+path}","compare_url":"https://api.github.com/repos/ARM-software/workload-automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARM-software/workload-automation/merges","archive_url":"https://api.github.com/repos/ARM-software/workload-automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARM-software/workload-automation/downloads","issues_url":"https://api.github.com/repos/ARM-software/workload-automation/issues{/number}","pulls_url":"https://api.github.com/repos/ARM-software/workload-automation/pulls{/number}","milestones_url":"https://api.github.com/repos/ARM-software/workload-automation/milestones{/number}","notifications_url":"https://api.github.com/repos/ARM-software/workload-automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARM-software/workload-automation/labels{/name}","releases_url":"https://api.github.com/repos/ARM-software/workload-automation/releases{/id}","deployments_url":"https://api.github.com/repos/ARM-software/workload-automation/deployments","created_at":"2015-03-10T13:05:03Z","updated_at":"2016-08-12T06:52:16Z","pushed_at":"2016-08-25T10:21:47Z","git_url":"git://github.com/ARM-software/workload-automation.git","ssh_url":"git@github.com:ARM-software/workload-automation.git","clone_url":"https://github.com/ARM-software/workload-automation.git","svn_url":"https://github.com/ARM-software/workload-automation","homepage":null,"size":48528,"stargazers_count":35,"watchers_count":35,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":14,"forks":34,"open_issues":14,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/227"},"html":{"href":"https://github.com/ARM-software/workload-automation/pull/227"},"issue":{"href":"https://api.github.com/repos/ARM-software/workload-automation/issues/227"},"comments":{"href":"https://api.github.com/repos/ARM-software/workload-automation/issues/227/comments"},"review_comments":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/227/comments"},"review_comment":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARM-software/workload-automation/pulls/227/commits"},"statuses":{"href":"https://api.github.com/repos/ARM-software/workload-automation/statuses/1c69396bc5e2d108602517afd313878be4bb7da6"}}}}
{"actor":{"display_login":"muendelezaji"}}