Skip to content
This repository was archived by the owner on Jan 26, 2021. It is now read-only.

Commit fd85eb3

Browse files
Merge pull request #378 from smarshy/update-docs
Updated AUT documentation
2 parents 09a6837 + 963697a commit fd85eb3

File tree

3 files changed

+47
-41
lines changed

3 files changed

+47
-41
lines changed

aut_docs/Design_Document.md

+13-41
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
The QA process is divided as follows:
44

5-
- Continuous Intergation: Used travis to setup CI for VMS Project
6-
- Functional Testing: Used Selnium to write UI tests from an end-users perspective.(black-box tests)
7-
- Unit Testing: Valeria is writing unit-tests for the codebase.(white-box tests)
5+
- Continuous Integration: Used travis to setup CI for VMS Project
6+
- Functional Testing: Used Selenium to write UI tests from an end-users perspective.(black-box tests)
7+
- Unit Testing: Unit-tests have been written for services in the codebase.(white-box tests)
88

99
## Few important points regarding CI:
1010

@@ -15,7 +15,7 @@ The QA process is divided as follows:
1515
## Few important points regarding Functional Testing:
1616

1717
- Selenium, a browser automation tool is used to simulate the functionality.
18-
python APIs for selnium are used in the tests.
18+
python APIs for selenium are used in the tests.
1919

2020
- Django provides a class `LiveServerTestCase`. What this does is that, It
2121
setups a Virtual Django Sever in the background which can be used by
@@ -35,43 +35,15 @@ The QA process is divided as follows:
3535
- Each app contains a `tests` folder containing the unit-tests and functional
3636
tests and an `__init__.py` to let django consider it as a package.
3737

38-
- Currently, only functional tests for admin views have been written.
38+
## Few important points regarding design pattern for Selenium tests:
3939

40-
## Steps to run tests:
40+
- The tests follow the page object model design. Pages in vms have been broken into
41+
objects which model their behaviour. The `pom` folder contains the architecture setup
42+
for this design.
4143

42-
- Currently, used `python 2.7`
43-
- Clone project: `git clone https://github.com/systers/vms.git`
44-
- In the root folder of the project, startup a new virtual environment
45-
`virtualenv -p /usr/bin/python2.7 venv`
46-
- Activate virtualenv, `source venv/bin/activate`
47-
- Install dependencies: `pip install -r requirements.txt`
48-
- `cd vms`
49-
- To run, `python manage.py runserver`. Browse
50-
`http://127.0.0.1:8000`
51-
- To execute tests `python manage.py test`. This will run all unit-tests and
52-
all functional-tests across all apps. To execute tests of only a particular
53-
app, run `python manage.py test <app_name>`
54-
- If all tests pass, `OK` will be received at the end.
55-
- For functional tests, a firefox window for each test will open up
56-
automatically and close after simulation of tests.
44+
- Each test file interacts with respective page objects and reuses their methods.
45+
To locate elements on the page both pages and tests use static locators defined in
46+
`pom/locators` folder. `pom/pages` folder contains the pages mapping to vms.
5747

58-
## Tests Failing
59-
60-
There are 8 Failures. These are due to issue [#327](https://github.com/systers/vms/issues/327) :
61-
62-
- test_report_with_empty_fields
63-
- test_job_field
64-
- test_intersection_of_fields
65-
- test_event_field
66-
- test_date_field
67-
- test_admin_cannot_access_volunteer_urls
68-
- test_cancel_assigned_shift
69-
- test_null_values_with_dataset
70-
- test_check_intersection_of_fields
71-
72-
one error
73-
- in test_volunteer_cannot_access_admin_urls
74-
75-
once [#325](https://github.com/systers/vms/issues/325) gets fixed this will automatically pass.
76-
77-
Note: The current setup uses one of the latest versions of Selenium. You will run into errors if the this version is incompatible with your firefox version and does not support it. In that case, follow [this](https://support.mozilla.org/en-US/kb/find-what-version-firefox-you-are-using) guide to find out your browser version and accordingly install a Selenium version compatible with it.
48+
- To follow up changes in UI with changes in tests, the modifications need to be made only
49+
in the relevant locators/urls/page file.

aut_docs/Documented_failures.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
There are several tests/parts of tests which have been commented out currently to avoid travis build failure:
2+
3+
|File |Tests |Reason/Related issue |
4+
|------------------------------|:------------------:|:------------------------: |
5+
| test_formFields.py | test_null_values_in_edit_event| [345](https://github.com/systers/vms/issues/345)|
6+
| test_formFields.py | test_field_value_retention_for_event, test_field_value_retention_for_job, test_field_value_retention_for_shift| [#350](https://github.com/systers/vms/issues/350)|
7+
| test_formFields.py | test_simplify_job|Cause of failure is still unclear|
8+
| test_report.py | test_null_values_with_dataset, test_check_intersection_of_fields| [#327](https://github.com/systers/vms/issues/327)|
9+
| test_settings.py | test_duplicate_event, test_duplicate_job|[#329](https://github.com/systers/vms/issues/329), [#330](https://github.com/systers/vms/issues/330)|
10+
| test_shiftSignUp.py | test_search_event| [#337](https://github.com/systers/vms/issues/337)|
11+
| test_functional.py | test_admin_cannot_access_volunteer_urls, test_volunteer_cannot_access_admin_urls| [#325](https://github.com/systers/vms/issues/325)|
12+
| test_functional_volunteer.py | test_location_fields|[#336](https://github.com/systers/vms/issues/336)|
13+
| test_viewVolunteerShift.py | test_access_another_existing_volunteer_view| [#326](https://github.com/systers/vms/issues/326)|
14+
| test_volunteerProfile.py |test_upload_resume, test_invalid_resume_format| [#305](https://github.com/systers/vms/issues/305) |
15+
| test_volunteerReport.py |test_report_with_empty_fields, test_date_field, test_event_field, test_job_field, test_intersection_of_fields| [#327](https://github.com/systers/vms/issues/327) |

aut_docs/Setup.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Steps to run tests:
2+
3+
- Currently, used `python 2.7`
4+
- Clone project: `git clone https://github.com/systers/vms.git`
5+
- In the root folder of the project, startup a new virtual environment
6+
`virtualenv -p /usr/bin/python2.7 venv`
7+
- Activate virtualenv, `source venv/bin/activate`
8+
- Install dependencies: `pip install -r requirements.txt`
9+
- `cd vms`
10+
- To run, `python manage.py runserver`. Browse
11+
`http://127.0.0.1:8000`
12+
- To execute tests `python manage.py test`. This will run all unit-tests and
13+
all functional-tests across all apps. To execute tests of only a particular
14+
app, run `python manage.py test <app_name>`
15+
- If all tests pass, `OK` will be received at the end.
16+
- For functional tests, a firefox window for each test will open up
17+
automatically and close after simulation of tests.
18+
19+
Note: The current setup uses one of the latest versions of Selenium. You will run into errors if the this version is incompatible with your firefox version and does not support it. In that case, follow [this](https://support.mozilla.org/en-US/kb/find-what-version-firefox-you-are-using) guide to find out your browser version and accordingly install a Selenium version compatible with it.

0 commit comments

Comments
 (0)