QA/Tools/Selenium/AMO Automation: Difference between revisions

From MozillaWiki
< QA
Jump to navigation Jump to search
Line 12: Line 12:
## Change the |href=| filename to match each of your testcase's filename
## Change the |href=| filename to match each of your testcase's filename
# From the command line, issue: java -jar selenium-server.jar -htmlSuite "*firefox" "https://preview.addons.mozilla.org" [1 -- just a footnote, don't enter me!] "/Users/stephend/Desktop/selenium-remote-control-1.0-SNAPSHOT/htmlSuite/testSuite.html" "/Users/stephend/Desktop/results.html" (substituting, of course, the folder name of your RC version and path/to/tests and path/to/results.html)
# From the command line, issue: java -jar selenium-server.jar -htmlSuite "*firefox" "https://preview.addons.mozilla.org" [1 -- just a footnote, don't enter me!] "/Users/stephend/Desktop/selenium-remote-control-1.0-SNAPSHOT/htmlSuite/testSuite.html" "/Users/stephend/Desktop/results.html" (substituting, of course, the folder name of your RC version and path/to/tests and path/to/results.html)
# If all goes, well, your first testcase will begin running; when it's finished, it'll run the next testcase, and once that's completed, it'll quit Firefox and write out |results.html|


[1] This is the base URL, and what your test scripts will key off of
[1] This is the base URL, and what your test scripts will key off of

Revision as of 09:17, 3 July 2008

Selenium IDE/RC and AMO, or: How I Learned to Stop Worrying and Love Automation

Questions? Feedback/suggestions? Email stephend@mozilla.com

How to record and play back Selenium IDE scripts

  1. Record the script(s) with Selenium IDE
    1. Be sure to record relative, not absolute paths (i.e. /en-US/firefox/some/AMO/url/, rather than https://preview.addons.mozilla.org/en-US/firefox/some/AMO/url
  2. Download and install Selenium RC -- literally just unzip it into its own folder
    1. In the root of your Selenium RC folder, create a folder called htmlSuite
    2. Drop your testcase.html file(s) into the htmlSuite directory
    3. In htmlSuite, create an HTML file called testSuite.html, following the markup in http://wiki.openqa.org/display/SIDE/Automating+Selenium+IDE+tests
    4. Change the |href=| filename to match each of your testcase's filename
  3. From the command line, issue: java -jar selenium-server.jar -htmlSuite "*firefox" "https://preview.addons.mozilla.org" [1 -- just a footnote, don't enter me!] "/Users/stephend/Desktop/selenium-remote-control-1.0-SNAPSHOT/htmlSuite/testSuite.html" "/Users/stephend/Desktop/results.html" (substituting, of course, the folder name of your RC version and path/to/tests and path/to/results.html)
  4. If all goes, well, your first testcase will begin running; when it's finished, it'll run the next testcase, and once that's completed, it'll quit Firefox and write out |results.html|

[1] This is the base URL, and what your test scripts will key off of

Sounds great and all, but what does this do for / how does this help AMO?

  1. The idea is to not regress critical things like search, other functionality/page views
  2. Limitation: not a unit test