Changes between Initial Version and Version 1 of DeveloperGuidelines/Testing/Roles


Ignore:
Timestamp:
08/12/13 00:37:16 (8 years ago)
Author:
somayjain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Testing/Roles

    v1 v1  
     1= Roles Tests =
     2
     3== Introduction ==
     4
     5Role tests are used to check the permissions of user roles.
     6
     7== Running The Tests ==
     8
     9Make sure that the database is prepopulated. If not, then run -
     10{{{
     11cd web2py/applications/eden
     12rm databases/*
     13cd ../..
     14python web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py
     15}}}
     16
     17To start the tests, run -
     18{{{
     19python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --suite roles
     20}}}
     21
     22== Information About the Test Suite ==
     23
     24=== Location ===
     25
     26The tests are located in {{{modules/tests/roles/}}}
     27
     28The template specific files are located in {{{modules/tests/roles/<template_name>}}}
     29
     30=== Files ===
     31
     32* The file {{{modules/tests/roles/test_roles.py}}} tests permissions against role matrix file.
     33* The data for the roles tests is created by {{{modules/tests/roles/create_role_test_data.py}}}
     34 * It depends on the following for creating the data -
     35  * {{{org_organisation.xml}}} - A generic file for all templates. It is used for importing the organisation.
     36  * {{{org_organisation_branch.xml}}} - A generic file for all templates. It is used for importing the organisation branches, if the template uses branches.
     37  * {{{<template_name>/data.xml}}} - A file template for the data which the user's roles will be tested against.
     38  * {{{<template_name>/users_template.csv}}} - A file template for the users and roles which will be tested.
     39  * {{{<template_name>/test_users.csv}}} - An optional file which is used to create users - handy for debugging.
     40* The user permissions are defined in {{{<template_name>/Org-A_permission_matrix.csv}}}. The permissions declared in this file are tested upon.
     41