Closed
Bug 802227
Opened 13 years ago
Closed 13 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•13 years ago
|
Assignee: nobody → dburns
Assignee | ||
Comment 1•13 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•13 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•13 years ago
|
||
Assignee | ||
Comment 4•13 years ago
|
||
Assignee | ||
Comment 5•13 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•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment 7•13 years ago
|
||
Did you forget to fix MarionetteJSTestCase or something?
Comment 8•13 years ago
|
||
This turned marionette red:
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&jobname=marionette&rev=be7c882f0f85&noignore=1
Updated•13 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 9•13 years ago
|
||
patch for this is on bug 803850
Assignee | ||
Comment 10•13 years ago
|
||
patch in bug 803850 has landed and merged to m-c, closing
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Comment 11•13 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•13 years ago
|
||
But it does work, thanks
Reporter | ||
Updated•13 years ago
|
Whiteboard: [automation-needed-in-aurora]
Reporter | ||
Comment 13•13 years ago
|
||
Reporter | ||
Comment 14•13 years ago
|
||
status-firefox18:
--- → fixed
status-firefox19:
--- → fixed
Whiteboard: [automation-needed-in-aurora]
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•