B2G/QA/Automation/Style Guide/Python Script Style: Difference between revisions

Line 88: Line 88:
Using test variable file when running gaiatest can avoid defining variables inside the script.  The testvars template is located [http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/testvars_template.json here].  
Using test variable file when running gaiatest can avoid defining variables inside the script.  The testvars template is located [http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/testvars_template.json here].  
<br>
<br>
Make sure to fill in the appropriate section if you're planning to use it, and supply the name and location of the .json file as the parameter to the '''gaiatest''' command with '''--testvars=''' option.
Make sure to fill in the appropriate section if you're planning to use it, and supply the name and location of the .json file as the parameter to the '''gaiatest''' command with '''--testvars=''' option.  Please talk to the QA automation team members if you wish to use the same testvar values being used for the jenkins run.
<br><br>
<br><br>
If you want to access the varable value defined in the .json file, you can do as the following example:
If you want to access the varable value defined in the .json file, you can do as the following example:
352

edits