QA/Execution/Web Testing/Docs/Automation/Testcases/ConfigFiles: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with 'Config-file documentation')
 
No edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Config-file documentation
Config-file documentation  
 
We have 3 configuration files that we use in our automation test cases:
 
#''configurationAMO''
#''TCParameters'' (previously ''browserConfig'')
#''GridConnection''
 
===== <u>'''configurationAMO''':</u>  =====
 
This file is not available on SVN for viewing. It contains tuples/associative arrays of the following:<br>
 
1. Different user types such as admin user, non-admin user, a user with developer rights, a user with certain&nbsp;&nbsp; addons etc.
 
A sample user array looks like non_adm = {'login':'nonadminuser@example.com', 'pwd':'somepassword', 'fname':'John', 'nick':'john_non_adm'}.
 
So, if you want to acces the user array from AMOfunctions.py then the code would look like:<br>
 
''user = self.objConfigAMO.getUserInfo(userType) ''
 
and in your test case it would look like:<br>
 
self.objAMOfunc.login('userNonAdm' sel) <br>
 
2. Different add-ons. If you want to use a specific add-on then it should be added to the addons array in this file. <br>
 
Note: It is recommended not to use a specific add-on unless necessary. Currently, our tests picks a random add-on from the home-page if you call the function ''getRandomAddonVersion2(appName, sel) ''<br>
 
<br>
 
===== <u>'''TCparams:'''</u>  =====
 
TCParameters has variables defined with values that are required to run a test case. The module has multiple classes which defines parameters for different test suites:&nbsp;Smoke tests, Basic Functional Tests and Full Functional Tests.<br>
 
Some of the variables defined here are: <br>
 
*limits for processing loops
** maxCategories = 3&nbsp;&nbsp; i.e. maximum number of categories checked in test case
** maxItemsPerPage = 10 &nbsp; i.e. maximum number of items (ex: personas, add-ons) checked per page
* list sort and filter options
** AMOhomePageSortOptions = ['recommended', 'popular', 'added', 'updated']
** personasBrowsePageSortOptions = ['up-and-coming', 'created', 'popular']<br>
 
Depending on the kind of test suite, the values will differ. For e.g. maxCategories = 1 (for Smoke Test Suite); maxCategories = 3 (for BFT Suite); maxCategories = 99 (for FFT); <br>
 
<br>
 
===== GridConnection:<br>  =====
 
This file defines Selenium Grid server variables which almost never changes. It defines the environment names (browser &amp; OS) we have on Grid setup.
 
 
 
<br>
 
<br>

Latest revision as of 21:59, 30 September 2010

Config-file documentation

We have 3 configuration files that we use in our automation test cases:

  1. configurationAMO
  2. TCParameters (previously browserConfig)
  3. GridConnection
configurationAMO:

This file is not available on SVN for viewing. It contains tuples/associative arrays of the following:

1. Different user types such as admin user, non-admin user, a user with developer rights, a user with certain   addons etc.

A sample user array looks like non_adm = {'login':'nonadminuser@example.com', 'pwd':'somepassword', 'fname':'John', 'nick':'john_non_adm'}.

So, if you want to acces the user array from AMOfunctions.py then the code would look like:

user = self.objConfigAMO.getUserInfo(userType)

and in your test case it would look like:

self.objAMOfunc.login('userNonAdm' sel)

2. Different add-ons. If you want to use a specific add-on then it should be added to the addons array in this file.

Note: It is recommended not to use a specific add-on unless necessary. Currently, our tests picks a random add-on from the home-page if you call the function getRandomAddonVersion2(appName, sel)


TCparams:

TCParameters has variables defined with values that are required to run a test case. The module has multiple classes which defines parameters for different test suites: Smoke tests, Basic Functional Tests and Full Functional Tests.

Some of the variables defined here are:

  • limits for processing loops
    • maxCategories = 3   i.e. maximum number of categories checked in test case
    • maxItemsPerPage = 10   i.e. maximum number of items (ex: personas, add-ons) checked per page
  • list sort and filter options
    • AMOhomePageSortOptions = ['recommended', 'popular', 'added', 'updated']
    • personasBrowsePageSortOptions = ['up-and-coming', 'created', 'popular']

Depending on the kind of test suite, the values will differ. For e.g. maxCategories = 1 (for Smoke Test Suite); maxCategories = 3 (for BFT Suite); maxCategories = 99 (for FFT);


GridConnection:

This file defines Selenium Grid server variables which almost never changes. It defines the environment names (browser & OS) we have on Grid setup.