Closed
Bug 802227
Opened 11 years ago
Closed 11 years ago
Add --testvars argument to Marionette
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(firefox18 fixed, firefox19 fixed)
RESOLVED
FIXED
mozilla19
People
(Reporter: jgriffin, Assigned: automatedtester)
References
Details
Attachments
(2 files)
7.45 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
5.81 KB,
text/plain
|
Details |
Zac needs a way to pass private information into a test, that should not be hardcoded in a test, such as the marketplace credentials. We could add a --testvars argument that would point to a Python or JSON file containing a dict with values that we'd make available to tests, e.g., --testvars mypassword.py contains test_vars = { 'user': 'joe', 'password': 'foobar' } A test might use these then like: def test_something(self): element = # find some element element.send_keys(self.test_vars['user'])
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → dburns
Assignee | ||
Comment 1•11 years ago
|
||
Adding in the ability to run tests with --testvars that takes a JSON file. Chose JSON since that way they will be able to manipulate the data as they want and just work with a dictionary to get the data out.
Attachment #673264 -
Flags: review?(jgriffin)
Reporter | ||
Comment 2•11 years ago
|
||
Comment on attachment 673264 [details] [diff] [review] adding in test vars Review of attachment 673264 [details] [diff] [review]: ----------------------------------------------------------------- Looks good! Can you also bump the version in setup.py to 0.5, and then after landing this, mirror it to github, and then post the package to pypi? I'll need to set you as an owner of the pypi package, so msg me your pypi username. ::: testing/marionette/client/marionette/runtests.py @@ +202,5 @@ > + > + if testvars is not None: > + if not os.path.exists(testvars): > + raise Exception('--testvars file does not exist') > + Can you remove the extra whitespace at the beginning of this line?
Attachment #673264 -
Flags: review?(jgriffin) → review+
Assignee | ||
Comment 3•11 years ago
|
||
Landed on m-i https://hg.mozilla.org/integration/mozilla-inbound/rev/be7c882f0f85
Assignee | ||
Comment 4•11 years ago
|
||
landed on github https://github.com/mozilla/marionette_client/commit/e8e27490a9c4c9cebbba50e4ad9a3221c87a96a3
Assignee | ||
Comment 5•11 years ago
|
||
uploaded to pypi . . . Writing marionette_client-0.5/setup.cfg creating dist Creating tar archive removing 'marionette_client-0.5' (and everything under it) running upload Submitting dist/marionette_client-0.5.tar.gz to http://pypi.python.org/pypi Server response (200): OK
Comment 6•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/be7c882f0f85
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment 7•11 years ago
|
||
Did you forget to fix MarionetteJSTestCase or something?
Comment 8•11 years ago
|
||
This turned marionette red: https://tbpl.mozilla.org/?tree=Mozilla-Inbound&jobname=marionette&rev=be7c882f0f85&noignore=1
Updated•11 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 9•11 years ago
|
||
patch for this is on bug 803850
Assignee | ||
Comment 10•11 years ago
|
||
patch in bug 803850 has landed and merged to m-c, closing
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 11•11 years ago
|
||
IMO JSON is not a good choice for this because it's very sensitive to syntax and you can't put comments into it.
Comment 12•11 years ago
|
||
But it does work, thanks
Reporter | ||
Updated•11 years ago
|
Whiteboard: [automation-needed-in-aurora]
Reporter | ||
Comment 13•11 years ago
|
||
https://hg.mozilla.org/projects/ash/rev/e33e555e97bd
Reporter | ||
Comment 14•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/6707e87ab00a
status-firefox18:
--- → fixed
status-firefox19:
--- → fixed
Whiteboard: [automation-needed-in-aurora]
Updated•2 months ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•