Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 141 lines (90 sloc) 7.683 kb
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
1 Selenium Tests for addons.mozilla.org (amo)
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
2 ====================
f0fafbe David Burns initial design of Page Objects and 4 tests'
AutomatedTester authored
3
1755056 Update to include link to contributors
Zac authored
4 Thank you for checking out Mozilla's Addon-Tests test suite. Mozilla and the Mozwebqa team are grateful for the help and hard work of many contributors like yourself.
5 The following contributors have submitted pull requests to Addon-Tests:
860fed6 add line for formatting
Zac authored
6
1755056 Update to include link to contributors
Zac authored
7 https://github.com/mozilla/Addon-Tests/contributors
f0fafbe David Burns initial design of Page Objects and 4 tests'
AutomatedTester authored
8
1755056 Update to include link to contributors
Zac authored
9 Getting involved as a contributor
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
10 ------------------------------------------
11
1755056 Update to include link to contributors
Zac authored
12 We love working with contributors to fill out the Selenium test coverage for Addon-Tests, but it does require a few skills. You will need to know some Python, some Selenium and you will need some basic familiarity with Github.
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
13
0bdfbe3 Update links, some review revisions.
Zac authored
14 If you know some Python, it's worth having a look at the Selenium framework to understand the basic concepts of browser based testing and especially page objects. Our suite uses [Selenium WebDriver][webdriver].
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
15
16 If you need to brush up on programming but are eager to start contributing immediately, please consider helping us find bugs in Mozilla [Firefox][firefox] or find bugs in the Mozilla web-sites tested by the [WebQA][webqa] team.
17
ce45ae0 Stephen Donner Minor, minor typos (extra whitespace char + missing period).
stephendonner authored
18 To brush up on Python skills before engaging with us, [Dive Into Python][dive] is an excellent resource. MIT also has [lecture notes on Python][mit] available through their open courseware.The programming concepts you will need to know include functions, working with classes, and some object oriented programming basics.
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
19
20 [mit]: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2011/
0bdfbe3 Update links, some review revisions.
Zac authored
21 [dive]: http://www.diveintopython.net/toc/index.html
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
22 [webqa]: http://quality.mozilla.org/teams/web-qa/
23 [firefox]: http://quality.mozilla.org/teams/desktop-firefox/
24 [webdriver]: http://seleniumhq.org/docs/03_webdriver.html
25
26 Questions are always welcome
27 ----------------------------
bea72f9 Marlena Compton pull request fixes
Marlena authored
28 While we take pains to keep our documentation updated, the best source of information is those of us who work on the project. Don't be afraid to join us in irc.mozilla.org #mozwebqa to ask questions about our Selenium tests. Mozilla also hosts the #mozillians chat room to answer your general questions about contributing to Mozilla.
29
30 [mozwebqa]:http://02.chat.mibbit.com/?server=irc.mozilla.org&channel=#mozwebqa
31 [mozillians]:http://02.chat.mibbit.com/?server=irc.mozilla.org&channel=#mozillians
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
32
33 How to Set up and Build AMO Tests Locally
34 -----------------------------------------
17aec33 update documentation
Zac authored
35 This repository contains Selenium tests used to test the website addons.mozilla.org.
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
36
dfe39f9 Update doc
Zac authored
37 Mozilla maintains a guide to running Automated tests on our QMO website:
3b5853d Formatting
Zac authored
38
17aec33 update documentation
Zac authored
39 https://quality.mozilla.org/docs/webqa/running-webqa-automated-tests/
40
41 This wiki page has some advanced instructions specific to Windows:
3b5853d Formatting
Zac authored
42
17aec33 update documentation
Zac authored
43 https://wiki.mozilla.org/QA_SoftVision_Team/WebQA_Automation
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
44
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
45
17aec33 update documentation
Zac authored
46 ###You will need to install the following:
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
47
7b5d2d5 fornmasdf
Zac authored
48 #### Git
17aec33 update documentation
Zac authored
49 If you have cloned this project already then you can skip this!
50 GitHub has excellent guides for [Windows][GitWin], [MacOSX][GitMacOSX] and [Linux][GitLinux].
51 [GitWin]: http://help.github.com/win-set-up-git/
52 [GitMacOSX]: http://help.github.com/mac-set-up-git/
53 [GitLinux]: http://help.github.com/linux-set-up-git/
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
54
7b5d2d5 fornmasdf
Zac authored
55 #### Python
17aec33 update documentation
Zac authored
56 Before you will be able to run these tests you will need to have [Python 2.6][Python] installed.
0bdfbe3 Update links, some review revisions.
Zac authored
57 [Python]: http://www.python.org/download/releases/2.6.6/
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
58
7b5d2d5 fornmasdf
Zac authored
59 #### Running tests locally
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
60
dfe39f9 Update doc
Zac authored
61 Tests are run using the py.test library. You will find examples here for running all of the tests, tests in one file and running a single test.
62
63 WebDriver does not need a Selenium Server or Grid to run so these examples bypass this step and just use the --driver command.
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
64
17aec33 update documentation
Zac authored
65 An example of running all tests without a Selenium Server:
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
66
17aec33 update documentation
Zac authored
67 py.test --driver=firefox --credentials=/credentials.yaml
68
69 An example of running all of the tests in one file:
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
70
0bdfbe3 Update links, some review revisions.
Zac authored
71 py.test --driver=firefox --credentials=/credentials.yaml tests/test_details_page.py
17aec33 update documentation
Zac authored
72
73 An example of running one test in a file:
c3076b3 Dave Hunt Updated README.
davehunt authored
74
0bdfbe3 Update links, some review revisions.
Zac authored
75 py.test --driver=firefox --credentials=/credentials.yaml tests/test_details_page.py -k test_that_external_link_leads_to_addon_website
c3076b3 Dave Hunt Updated README.
davehunt authored
76
64f07fd Leah Klearman mark stray native test
klrmn authored
77 If running on a Mac, skip tests which require 'native' support:
78
74e5fe0 Leah Klearman add note about running desktop OR mobile tests
klrmn authored
79 py.test --driver=firefox --credentials=/credentials.yaml -m 'not native'
80
81 Depending on the platform you're running the tests on, run only the tests in the mobile or desktop directories:
82
83 py.test --driver=firefox --credentials=/credentials.yaml ./tests/desktop
84 py.test --driver=firefox --credentials=/credentials.yaml ./tests/mobile
64f07fd Leah Klearman mark stray native test
klrmn authored
85
dfe39f9 Update doc
Zac authored
86 For information about running tests against a Selenium Grid or moz-grid-config see the section in this document about setting up moz-grid-config.
87
88 The mozwebqa plugin has advanced command line options for reporting and using browsers. See the documentation on [davehunt's pytest mozwebqa github][pymozwebqa]:
3b5853d Formatting
Zac authored
89 [pymozwebqa]: https://github.com/davehunt/pytest-mozwebqa
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
90
7b5d2d5 fornmasdf
Zac authored
91 ####Virtualenv and Virtualenvwrapper (Optional/Intermediate level)
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
92 While most of us have had some experience using virtual machines, [virtualenv][venv] is something else entirely. It's used to keep libraries that you install from clashing and messing up your local environment. After installing virtualenv, installing [virtualenvwrapper][wrapper] will give you some nice commands to use with virtualenvwrapper.
93
94 [venv]: http://pypi.python.org/pypi/virtualenv
95 [wrapper]: http://www.doughellmann.com/projects/virtualenvwrapper/
96
7b5d2d5 fornmasdf
Zac authored
97 #### Moz-grid-config (Optional/Intermediate level)
3b5853d Formatting
Zac authored
98 Prerequisites: [Java Runtime Environment][Java JRE], [Apache Ant][ANT]
99
17aec33 update documentation
Zac authored
100 [Moz-grid-config][moz-grid] is a project containining our Selenium Grid configuration. It uses Apache Ant to run the Selenium hub or node to the configuration defined in the yaml files.
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
101
17aec33 update documentation
Zac authored
102 We recommend git cloning the repository for a couple of reasons:
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
103
17aec33 update documentation
Zac authored
104 1. The commands to launch a node or hub are all pre-configured and as simple as typing `ant launch-hub` or `ant launch-node`
105 2. The paths to browser binaries and nodes can be stored in configuration (yaml) files
106 3. It contains a jar file of the latest Selenium in it's lib directory
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
107
bea72f9 Marlena Compton pull request fixes
Marlena authored
108 (If you prefer to download Selenium it's own, you can do that from [here][Selenium Downloads])
4989420 Marlena Compton updated readme...A LOT.
Marlena authored
109 You will need to make sure that the name of your Firefox application matches one of the names in moz-grid-config/grid_configuration.yml. As an example: even though Firefox typically installs without a version number in the name, moz-grid-config requires it to be named "Firefox <version number>".app on mac.
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
110
bea72f9 Marlena Compton pull request fixes
Marlena authored
111 [moz-grid]:https://github.com/mozilla/moz-grid-config
17aec33 update documentation
Zac authored
112 [ANT]: http://ant.apache.org/
113 [Java JRE]: http://www.oracle.com/technetwork/java/javase/downloads/index.html
3b5853d Formatting
Zac authored
114 [Selenium Downloads]: http://code.google.com/p/selenium/downloads/list
f4b2f82 Updated the readme with the new command line options
bebef1987 authored
115
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
116
117 Writing Tests
118 -------------
119
120 If you want to get involved and add more tests then there's just a few things
121 we'd like to ask you to do:
122
123 1. Use the [template files][GitHub Templates] for all new tests and page objects
124 2. Follow our simple [style guide][Style Guide]
125 3. Fork this project with your own GitHub account
f16d58c Teodosia Pop Updated the README.md to reflect the new folders format of the repo.
teodosia authored
126 4. Add your test into the "tests" folder and the necessary methods for it into the appropriate file in "pages"
3b5853d Formatting
Zac authored
127 5. Make sure all tests are passing and submit a pull request with your changes
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
128
d26b995 E. Dunham Fixing broken link in README
edunham authored
129 [GitHub Templates]: https://github.com/mozilla/mozwebqa-test-templates
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
130 [Style Guide]: https://wiki.mozilla.org/QA/Execution/Web_Testing/Docs/Automation/StyleGuide
131
132 License
133 -------
4f8cc9e Teodosia Pop Upgrade license to MPL 2
teodosia authored
134 This software is licensed under the [MPL] 2.0:
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
135
4f8cc9e Teodosia Pop Upgrade license to MPL 2
teodosia authored
136 This Source Code Form is subject to the terms of the Mozilla Public
137 License, v. 2.0. If a copy of the MPL was not distributed with this
138 file, You can obtain one at http://mozilla.org/MPL/2.0/.
1072741 David Burns Updated README to make it consistent
AutomatedTester authored
139
4f8cc9e Teodosia Pop Upgrade license to MPL 2
teodosia authored
140 [MPL]: http://www.mozilla.org/MPL/2.0/
Something went wrong with that request. Please try again.