From 5782d8e396e19925b453146ae779a3afec4d36d4 Mon Sep 17 00:00:00 2001 From: Shing Lyu Date: Fri, 22 Jan 2016 15:41:52 +0800 Subject: [PATCH] Fuzzy parse the spreadsheet title rowA --- commit.py | 13 +- commit.sh | 5 +- ...LDq0mQLzPJc-q59vZWJQ8Pla7bPiwZYr9B_fQ.json | 292 ------------------ testcases_locations.txt | 1 + .../moztrap_integration/moztrapcli | 2 +- .../test/manual/manual_full_cycle.md | 13 + 6 files changed, 25 insertions(+), 301 deletions(-) delete mode 100644 testcases/1qSJpJGLDq0mQLzPJc-q59vZWJQ8Pla7bPiwZYr9B_fQ.json create mode 100644 tests/mozilluminate/test/manual/manual_full_cycle.md diff --git a/commit.py b/commit.py index ecc6ea5..6f0ff45 100644 --- a/commit.py +++ b/commit.py @@ -2,6 +2,7 @@ import json from oauth2client.client import SignedJwtAssertionCredentials import gspread +import re def get_key_from_url(url): m1 = gspread.client._url_key_re_v1.search(url) @@ -38,14 +39,18 @@ def main(): #wks.update_acell('B2', "it's down there somewhere, let me take another look.") # Fetch a cell range - test_case_title = wks.find('Test Case') #TODO: case insensitive? + title_re = re.compile(r'(Test Case)', re.IGNORECASE) + test_case_title = wks.find(title_re) #TODO: case insensitive? test_cases_col = wks.col_values(test_case_title.col) - test_steps_title = wks.find('Test Steps') + steps_re = re.compile(r'((Test |)Steps)', re.IGNORECASE) + test_steps_title = wks.find(steps_re) # TODO: parse the steps test_steps_col = wks.col_values(test_steps_title.col) - test_descriptions_title = wks.find('Descriptions / Prerequisite') + desc_re = re.compile(r'(Description[s]? \/ Prerequisite[s]?|Description[s]?|Prerequisite[s]?)', re.IGNORECASE) + test_descriptions_title = wks.find(desc_re) test_descriptions_col = wks.col_values(test_descriptions_title.col) - test_tags_title = wks.find('Tag') + tag_re = re.compile(r'(Tag[s]?)', re.IGNORECASE) + test_tags_title = wks.find(tag_re) test_tags_col = wks.col_values(test_tags_title.col) #cell_list = wks.range('A1:B7') #test_cases = zip(test_cases_col, test_steps_col)[1:] #Skip the title row diff --git a/commit.sh b/commit.sh index 1b62ee5..751d5b8 100755 --- a/commit.sh +++ b/commit.sh @@ -1,6 +1,3 @@ #!/bin/bash -python commit.py -git add testcases/ -git commit -git push +python commit.py && git add testcases/ && git commit && git push diff --git a/testcases/1qSJpJGLDq0mQLzPJc-q59vZWJQ8Pla7bPiwZYr9B_fQ.json b/testcases/1qSJpJGLDq0mQLzPJc-q59vZWJQ8Pla7bPiwZYr9B_fQ.json deleted file mode 100644 index 0f6a8b5..0000000 --- a/testcases/1qSJpJGLDq0mQLzPJc-q59vZWJQ8Pla7bPiwZYr9B_fQ.json +++ /dev/null @@ -1,292 +0,0 @@ -[ - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "Reference: FTE Spec v2.5, pages 4-7", - "tags": [ - "fte", - "simulator", - "tv" - ], - "state": "active", - "id": "[TV FTE] FTE Settings - Disable App Usage", - "instructions": "1. Launch Apps Deck\n >>> \n\n2. Launch \"TV FTU\" app\n >>> * The first page should be Mozilla Privacy Policy\n* The default highlight is OK button\n* OK button should be gray\n\n\n3. Press Up or Down to read all the legal words\n >>> * User can scroll up and down well\n* Every word of the policy is correct\n\n4. Scroll to the bottom of \"Mozilla Privacy Policy\" page\n >>> * The user has to read all the legal words in Mozilla Privacy Policy page\n* OK button should be blue when scrolling to the bottom of \"Mozilla Privacy Policy\" page\n\n5. Press OK\n >>> * User can press OK button to go to the next page.\n* The next page is \"About Firefox OS\"\n* OK button should be blue\n\n6. Check all strings and icons\n >>> * The default highlight is OK button.\n* All words should be correct. \n\n7. Press OK\n >>> * User can press OK button to go to the next page\n* The next page is another \"About Firefox OS\"\n\n8. Check all strings and icons\n >>> * The default highlight is OK button.\n* All words should be correct. \n\n9. Press arrow key to move the focus on \"No\" button\n >>> User can select either button \n\n10. Press OK\n >>> * User will exit \"TV FTU\" app\n* User will go back to Apps Deck\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "", - "tags": [ - "fte", - "simulator", - "tv" - ], - "state": "active", - "id": "[TV FTE] FTE Settings - Disable App Usage", - "instructions": "1. First time to experience TV\n >>> * The first page should be Mozilla Privacy Policy\n* OK button should be gray\n\n\n2. Press OK\n >>> User cannot press OK button to go to the next page\n\n3. Press Up or Down to read all the legal words\n >>> The legal words should be correct. Please see the attachment.\n\n4. Scroll to the bottom of Mozilla privacy policy\n >>> The user has to read all the legal words in Mozilla Privacy Policy page\n\n5. Press OK\n >>> * OK button should be blue\n* User can press OK button to go to the next page.\n* The next page is \"About Firefox OS\"\n\n6. Press OK\n >>> * OK button should be blue\n* The default highlight is OK button.\n* All words should be correct. Please see the attachment.\n* User can press OK button to go to the next page\n* The next page is \"About Firefox OS\"\n\n7. Press OK\n >>> * The default highlight is Yes button\n* The legal words should be correct. Please see the attachment.\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "Reference: FTE Spec v2.5, pages 4-7", - "tags": [ - "fte", - "simulator", - "tv-smoketest", - "tv" - ], - "state": "active", - "id": "[TV FTE] FTE Settings - Enable App Usage", - "instructions": "1. Launch Apps Deck\n >>> \n\n2. Launch FTE\n >>> * The first page should be Mozilla Privacy Policy\n* The default highlight is OK button\n* OK button should be gray\n\n3. Press Up or Down to read all the legal words\n >>> * User can scroll up and down well\n* Every word of the policy is correct\n\n4. Scroll to the bottom of \"Mozilla Privacy Policy\" page\n >>> * The user has to read all the legal words in Mozilla Privacy Policy page\n* OK button should be blue when scrolling to the bottom of \"Mozilla Privacy Policy\" page\n\n5. Press OK\n >>> * User can press OK button to go to the next page.\n* The next page is \"About Firefox OS\"\n* OK button should be blue\n\n6. Check all strings and icons\n >>> * The default highlight is OK button.\n* All words should be correct. \n\n7. Press OK\n >>> * User can press OK button to go to the next page\n* The next page is another \"About Firefox OS\"\n\n8. Check all strings and icons\n >>> * The default highlight is OK button.\n* All words should be correct. \n\n9. Press OK\n >>> * User will exit \"TV FTU\" app\n* User will go back to Apps Deck\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "Reference: FTE Spec v2.5, pages 4-7", - "tags": [ - "fte", - "simulator", - "tv-smoketest", - "tv" - ], - "state": "active", - "id": "[TV FTE] FTE Settings - Enable App Usage", - "instructions": "1. Launch Apps Deck\n >>> \n\n2. Launch \"TV FTU\" app\n >>> * The first page should be Mozilla Privacy Policy\n* The default highlight is OK button\n* OK button should be gray\n\n3. Press OK\n >>> User cannot press OK button to go to the next page\n\n4. Press Up or Down to read all the legal words\n >>> * User can scroll up and down well\n* Every word of the policy is correct\n\n5. Scroll to the bottom of \"Mozilla Privacy Policy\" page\n >>> * The user has to read all the legal words in Mozilla Privacy Policy page\n* OK button should be blue when scrolling to the bottom of \"Mozilla Privacy Policy\" page\n\n6. Press OK\n >>> * User can press OK button to go to the next page.\n* The next page is \"About Firefox OS\"\n* OK button should be blue\n\n7. Press OK\n >>> * The default highlight is OK button.\n* All words should be correct. \n* User can press OK button to go to the next page\n* The next page is \"About Firefox OS\"\n\n8. Press OK\n >>> * The default highlight is Yes button\n* The legal words should be correct. \n* User can press OK button to go to the next page\n* The next page is another \"About Firefox OS\"\n\n9. Press OK\n >>> * User will exit \"TV FTU\" app\n* User will go back to Apps Deck\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "Reference: FTE Spec v2.5, pages 9-12", - "tags": [ - "fte", - "simulator", - "tv-smoketest", - "tv" - ], - "state": "active", - "id": "[TV FTE] Home Tutorial ", - "instructions": "1. Power on TV to launch FTE\n >>> * Label each app with short description\n* Please check all strings and icons\n* The default highlight is Next button\n* Next button should be blue\n\n\n2. Press OK\n >>> * User can press OK button to go to the next page\n* Label icons: Search, settings, add a folder, filter\n* Please check all strings and icons\n* The default highlight is OK button\n* OK button should be blue\n\n3. Press OK\n >>> User will go to home page\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "Reference: FTE Spec v2.5, pages 9-12", - "tags": [ - "fte", - "simulator", - "tv-smoketest", - "tv" - ], - "state": "active", - "id": "[TV FTE] Home Tutorial ", - "instructions": "1. Power on TV to launch FTE\n >>> * Label each app with short description\n* Please check all strings and icons\n* The default highlight is Next button\n* Next button should be blue\n\n\n2. Press OK\n >>> * User can press OK button to go to the next page\n* Label icons: Search, settings, add a folder, filter\n* Please check all strings and icons\n* The default highlight is OK button\n* OK button should be blue\n\n3. Press OK\n >>> User will go to home page\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "Reference: FTE Spec v2.5, pages 13-15", - "tags": [ - "fte", - "simulator", - "tv-smoketest", - "tv" - ], - "state": "active", - "id": "[TV FTE] Option menu ", - "instructions": "1. After Home tutorial, launch any app or TV channel\n >>> \n\n2. Press Option \n >>> Tutorial - Option Menu will be popped up \n\n3. Check all strings and icons\n >>> All words and icons should be correct\n\n4. Press OK\n >>> * The Tutorial - Option Menu will disappear on your screen.\n* Back to the option menu that you want\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "Reference: FTE Spec v2.5, pages 13-15", - "tags": [ - "fte", - "simulator", - "tv-smoketest", - "tv" - ], - "state": "active", - "id": "[TV FTE] Option menu ", - "instructions": "1. After Home tutorial, launch any app or TV channel \n >>> \n\n2. Press Option \n >>> * Tutorial - Option Menu will be popped up \n\n3. Check all strings and icons\n >>> All words and icons should be correct\n\n4. Press OK\n >>> * The Tutorial - Option Menu will disappear on your screen.\n* Back to the option menu that you want \n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "First Time Experience\nReference: FTE Spec v2.5, pages 18-20", - "tags": [ - "fte", - "simulator", - "tv-smoketest", - "tv" - ], - "state": "active", - "id": "[TV FTE] Tutorial (Send to TV) - Send tab to your TV", - "instructions": "1. Launch \"Send to TV\" app in Apps Deck\n >>> \n\n2. Check all strings and icons \n >>> * All strings and icons are correct in \"Step 1 of 2\" page \n* The default highlight is Next button\n* Next button should be blue\n\n3. Press OK \n >>> User can go to next page \n\n4. Check all strings and icons\n >>> * All strings and icons are correct in \"Step 2 of 2\" page \n* Default highlight is \"Learn how to send tab from your Android device\"\n* \"Learn how to send tab from your Android device\" button should be blue\n\n5. Press OK\n >>> User can go to next page\n\n6. Check all strings and icons\n\n >>> * All strings and icons are correct in \"Send tab to your TV\" page\n* Default highlight is \u201cDone\" button\n* Done button should be blue\n\n7. Scan QR-Code with to download and install add-on on your Android device\n >>> User can download and install add-on to Firefox on your Android device\n\n8. \nUse the URL link to download and install add-on on your Android device\n\n >>> User can download and install add-on to Firefox on your Android device\n\n9. Press OK\n >>> User can exit \"Send to TV\" app \n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "First Time Experience\nReference: FTE Spec v2.5, pages 18-20", - "tags": [ - "fte", - "simulator", - "tv-smoketest", - "tv" - ], - "state": "active", - "id": "[TV FTE] Tutorial (Send to TV) - Send tab to your TV", - "instructions": "1. Launch \"Send to TV\" app in Apps Deck\n >>> \n\n2. Check all strings and icons \n >>> * All strings and icons are correct in \"Step 1 of 2\" page \n* The default highlight is Next button\n* Next button should be blue\n\n3. Press OK \n >>> User can go to next page \n\n4. Check all strings and icons\n >>> * All strings and icons are correct in \"Step 2 of 2\" page \n* Default highlight is \"Learn how to send tab from your Android device\"\n* \"Learn how to send tab from your Android device\" button should be blue\n\n5. Press OK\n >>> User can go to next page\n\n6. Check all strings and icons\n\n >>> * All strings and icons are correct in \"Send tab to your TV\" page \n* Default highlight is \u201cDone\" button\n* Done button should be blue\n\n7. Scan QR-Code with to download and install add-on on your Android device\n >>> User can download and install add-on to Firefox on your Android device\n\n8. Use the url link to download and install add-on on your Android device\n >>> User can download and install add-on to Firefox on your Android device\n\n9. Press OK\n >>> User can exit \"Send to TV\" app\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "First Time Experience\nReference: FTE Spec v2.5, pages 18-20", - "tags": [ - "fte", - "simulator", - "tv" - ], - "state": "active", - "id": "[TV FTE] Tutorial (Send to TV)", - "instructions": "1. Launch \"Send to TV\" app in Apps Deck\n >>> \n\n2. Check all strings and icons \n >>> * All strings and icons are correct in \"Step 1 of 2\" page \n* The default highlight is Next button\n* Next button should be blue\n\n3. Press OK \n >>> User can go to next page \n\n4. Check all strings and icons\n >>> * All strings and icons are correct in \"Step 2 of 2\" page \n* Default highlight is \"Learn how to send tab from your Android device\"\n* \"Learn how to send tab from your Android device\" button should be blue\n\n5. Press arrow key to move the focus on \"Done\" button\n >>> \n\n6. Press OK\n >>> User will exit \"Send to TV\" app \n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "First Time Experience\nReference: FTE Spec v2.5, pages 18-20", - "tags": [ - "fte", - "simulator", - "tv" - ], - "state": "active", - "id": "[TV FTE] Tutorial (Send to TV)", - "instructions": "1. Launch Apps Deck in Apps Deck\n >>> \n\n2. Launch \"Send to TV\" app \n >>> \n\n3. Check all strings and icons \n >>> * All strings and icons are correct in \"Step 1 of 2\" page \n* The default highlight is Next button\n* Next button should be blue\n\n4. Press OK \n >>> User can go to next page \n\n5. Check all strings and icons\n >>> * All strings and icons are correct in \"Step 2 of 2\" page \n* Default highlight is \"Learn how to send tab from your Android device\"\n* \"Learn how to send tab from your Android device\" button should be blue\n\n6. Press arrow key to move the focus on \"Done\" button\n >>> \n\n7. Press OK\n >>> User will exit \"Send to TV\" app \n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "First Time Experience\nReference: FTE Spec v2.5, pages 18-20", - "tags": [ - "fte", - "simulator", - "tv-smoketest", - "tv" - ], - "state": "active", - "id": "[TV FTE] Browser - Account", - "instructions": "1. Launch Browser app after Home Tutorial\n >>> * Next button should be blue\n\n\n2. Check all strings and icons \n >>> * All strings and icons are correct\n* Default highlight is \u201cSign In\"\n* \u201cSign In\" button should blue\n\n3. Press OK \n >>> User can go to the Account-Sign in page \n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "First Time Experience\nReference: FTE Spec v2.5, pages 18-20", - "tags": [ - "fte", - "simulator", - "tv-smoketest", - "tv" - ], - "state": "active", - "id": "[TV FTE] Browser - Account", - "instructions": "1. Launch Browser app after Home Tutorial\n >>> * Next button should be blue\n\n\n2. Check all strings and icons \n >>> * All strings and icons are correct\n* Default highlight is \u201cSign In\"\n* \u201cSign In\" button should blue\n\n3. Press OK \n >>> User can go to the Account-Sign in page \n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "First Time Experience\nReference: FTE Spec v2.5, pages 21-22", - "tags": [ - "fte", - "simulator", - "tv" - ], - "state": "active", - "id": "[TV FTE] Browser - Skip", - "instructions": "1. Launch Browser app after Home Tutorial\n >>> \n\n2. Check all strings and icons \n >>> * All strings and icons are correct\n* Default highlight is \u201cSign In\"\n* \u201cSign In\" button should blue\n\n3. Press arrow key to move the focus on \"Skip\" button\n >>> \"Skip\" button should be white\n\n4. Press OK \n >>> * User will exit Browser tutorial\n* User will go to Browser app\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "First Time Experience\nReference: FTE Spec v2.5, pages 21-22", - "tags": [ - "fte", - "simulator", - "tv" - ], - "state": "active", - "id": "[TV FTE] Browser - Skip", - "instructions": "1. Launch Browser app after Home Tutorial\n >>> \n\n2. Check all strings and icons \n >>> * All strings and icons are correct\n* Default highlight is \u201cSign In\"\n* \u201cSign In\" button should blue\n\n3. Press arrow key to move the focus on \"Skip\" button\n >>> \"Skip\" button should be white\n\n4. Press OK \n >>> * User will exit Browser tutorial\n* User will go to Browser app\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "Reference: FTE Spec v2.5", - "tags": [ - "fte", - "simulator", - "tv" - ], - "state": "active", - "id": "[TV FTE] FTE Settings - Back button", - "instructions": "1. Launch Apps Deck\n >>> \n\n2. Launch \"TV FTU\" \n >>> \n\n3. Press OK twice \n >>> * User will go to another \"About\" page\n\n4. Press Back twice\n >>> * User will go to the \"Mozilla Privacy Policy\" page\n\n5. Press Back again\n >>> * User can exit \"TV FTU\"\n* User will go back to Apps Deck\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "Reference: FTE Spec v2.5", - "tags": [ - "fte", - "simulator", - "tv" - ], - "state": "active", - "id": "[TV FTE] FTE Settings - Back button", - "instructions": "1. Launch Apps Deck\n >>> \n\n2. Launch \"TV FTU\" \n >>> \n\n3. Press OK twice \n >>> * User will go to another \"About\" page\n\n4. Press Back twice\n >>> * User will go to the \"Mozilla Privacy Policy\" page\n\n5. Press Back again\n >>> * User can exit \"TV FTU\"\n* User will go back to Apps Deck\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "First Time Experience\nReference: FTE Spec v2.5, pages 24", - "tags": [ - "fte", - "simulator", - "tv" - ], - "state": "active", - "id": "[TV FTE] Offline tutorial (Send to TV)", - "instructions": "1. Offline\n >>> \n\n2. Launch \"Send to TV\" app in Apps Deck\n >>> User will go to \"Offline Tutorial\" page\n\n3. Check all strings and icons\n >>> * All strings and icons are correct \n* Default highlight is \"OK\" button\n* \"OK\" button should be blue\n\n4. Press OK\n >>> User will exit \"Send to TV\" app\n\n" - }, - { - "suites": [ - "Test MozIlluminate Cases 001" - ], - "description": "First Time Experience\nReference: FTE Spec v2.5, pages 24", - "tags": [ - "fte", - "simulator", - "tv" - ], - "state": "active", - "id": "[TV FTE] Offline tutorial (Send to TV)", - "instructions": "1. Offline\n >>> \n\n2. Launch Apps Deck\n >>> \n\n3. Launch \"Send to TV\" app \n >>> User will go to \"Offline Tutorial\" page\n\n4. Check all strings and icons\n >>> * All strings and icons are correct \n* Default highlight is \"OK\" button\n* \"OK\" button should be blue\n\n5. Press OK\n >>> User will go back to App Deck\n\n" - } -] \ No newline at end of file diff --git a/testcases_locations.txt b/testcases_locations.txt index f59a9d2..6f035f0 100644 --- a/testcases_locations.txt +++ b/testcases_locations.txt @@ -1,2 +1,3 @@ #https://docs.google.com/spreadsheets/d/1HuKEdxLjXmHpqcVbdmRCc6uZ9LBGpAsYPJ4mJml4cyU/edit#gid=491677371 https://docs.google.com/spreadsheets/d/10R1v-Vt5RZSLt-kw12zPL9dS-1npVFfKvB5OjG-g86k/edit#gid=491677371 +https://docs.google.com/spreadsheets/d/1qSJpJGLDq0mQLzPJc-q59vZWJQ8Pla7bPiwZYr9B_fQ/edit#gid=1773624167 diff --git a/tests/mozilluminate/moztrap_integration/moztrapcli b/tests/mozilluminate/moztrap_integration/moztrapcli index a0f0c63..50436e8 160000 --- a/tests/mozilluminate/moztrap_integration/moztrapcli +++ b/tests/mozilluminate/moztrap_integration/moztrapcli @@ -1 +1 @@ -Subproject commit a0f0c63b63cee498ca3300951f28103c3f36a52f +Subproject commit 50436e891147c06ea7f3e2500797f928866da938 diff --git a/tests/mozilluminate/test/manual/manual_full_cycle.md b/tests/mozilluminate/test/manual/manual_full_cycle.md new file mode 100644 index 0000000..07ea35f --- /dev/null +++ b/tests/mozilluminate/test/manual/manual_full_cycle.md @@ -0,0 +1,13 @@ +1. cd to moztrapcli +2. ./moztrap.py clone a moztrap.mozilla.org suite +3. Upload the xlsx to google spreadsheet +4. Add the bot user as described in mozilluminate readme +5. Go to MozIlluminate +6. Run commit.sh +7. Go to Travis CI + >>> verify the build passes +8. Go to moztrap-dev.allizom.org + >>> verify the case are pushed +9. Go back to the spreadsheet +10. Change some step, description +11. Repeat 5-8