-
Notifications
You must be signed in to change notification settings - Fork 5
QA 8094 script addition automation of find data by id testplan #411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
sameena1415
wants to merge
13
commits into
dimagi:master
from
sameena1415:QA-8094-script-addition-automation-of-find-data-by-id-testplan
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
08f9737
Find Data by ID functionality
sameena1415 c4108d8
Find Data by ID functionality
sameena1415 9e25872
Find Data by ID functionality
sameena1415 ddaf6f2
QA-8094 PR for FindByID testplan
kbo001 b111d70
cosmetic changes have been implemented for Find data by ID feauture
sameena1415 3250208
Merge branch 'master' into QA-8094-script-addition-automation-of-find…
sameena1415 712e333
find data by id -marked testcases as xfail
sameena1415 a40a892
find data by id -marked testcases as xfail
sameena1415 c0c6ad7
QA-8094 added updated find data by id files
kbo001 48c1dac
QA-8094 updated requires
kbo001 5a7cb9e
.github/workflows/find-data-by-id-tests.yml
kbo001 221867a
find data by id -code optimization
sameena1415 1edf345
QA-8094 resolved conflicts
kbo001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| ## Commcare Find Data by ID Test Script | ||
|
|
||
| These tests ensure that the [Find Data by ID] (https://dimagi.atlassian.net/wiki/spaces/commcarepublic/pages/2143955380/Find+Data+by+ID)features work as expected and that there are no regressions | ||
| The automated tests comprises of [these Find Data by ID] (https://docs.google.com/spreadsheets/d/1w25sl855-Tc-MBlQWKR8XZRmgE2TCtW8VH4M24RBvKw/edit?gid=594000179#gid=594000179) | ||
| ## Executing Scripts | ||
|
|
||
| ### <ins> On Local Machine </ins> | ||
|
|
||
| #### Setting up test environment | ||
|
|
||
| ```sh | ||
|
|
||
| # create and activate a virtualenv using your preferred method. Example: | ||
| python -m venv venv | ||
| source venv/bin/activate | ||
|
|
||
|
|
||
| # install requirements | ||
| pip install -r requires.txt | ||
|
|
||
| ``` | ||
|
|
||
| [More on setting up virtual environments](https://confluence.dimagi.com/display/GTD/QA+and+Python+Virtual+Environments) | ||
|
|
||
|
|
||
| #### Running Tests | ||
|
|
||
|
|
||
| - Copy `settings-sample.cfg` to `settings.cfg` and populate `settings.cfg` for | ||
| the environment you want to test. | ||
| - Run tests using pytest command like: | ||
|
|
||
| ```sh | ||
|
|
||
| # To execute all the test cases | ||
| pytest -v --rootdir= Features/FindDataById/testCases | ||
|
|
||
| ``` | ||
| - You could also pass the following arguments | ||
| - ` -n 3 --dist=loadfile` - This will run the tests parallelly in 3 instances. The number of reruns is configurable. | ||
| - ` --reruns 1` - This will re-run the tests once in case of failures.The number of reruns is configurable too. | ||
|
|
||
| ### <ins> Trigger Manually on Gitaction </ins> | ||
|
|
||
| <img align="right" width="400" src="https://user-images.githubusercontent.com/67914792/168757107-3ce9bb6a-57b5-4c15-b20d-e7883bf9ed65.PNG" alt="clone this repository" /> | ||
|
|
||
| To manually trigger the script, | ||
| - Go to [FindById action](https://github.com/dimagi/dimagi-qa/actions/find-data-by-id-tests.yml) | ||
| - Run workflow | ||
| - Use workflow from ```master``` | ||
| - Run! | ||
|
|
||
| If you are a part of the QA team, you'll receive emails for the result of the run after it's complete. | ||
|
|
||
| <img align="right" width="400" src="https://user-images.githubusercontent.com/67914792/168756705-88e4b330-b05a-4df2-a60c-7d45e8a2d002.PNG" alt="clone this repository" /> | ||
|
|
||
| Besides, you should be able to find the zipped results in the **Artifacts** section, of the corresponding run (after it's complete). |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| ## Stores information about all the libraries, modules, and packages that are used in this project. | ||
|
|
||
|
|
||
| flake8>=3.8.4 | ||
| pandas>=1.2.2 | ||
| pytest | ||
| py>=1.10.0 | ||
| pytest-html>=3.1.1 | ||
| pytest-json-report | ||
| selenium == 4.11.0 | ||
| openpyxl | ||
| matplotlib >= 3.3.4 | ||
| pytest-rerunfailures | ||
| pytest-xdist | ||
| pytest-xdist[psutil] | ||
| pytest-order | ||
| requests | ||
| imap-tools | ||
| beautifulsoup4 | ||
| html5lib | ||
| pytest-metadata | ||
| pyotp >=2.6.0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| [default] | ||
| # This is the environment url of commcare | ||
| url = https://www.commcarehq.org/ | ||
| # Login username of the webuser | ||
| login_username = | ||
| # Login password of the webuser | ||
| login_password = | ||
| # This is a preconfigured authentication key used for 2FA tests on staging - If 2FA enabled on staging. | ||
| staging_auth_key = | ||
| # This is a preconfigured authentication key used for 2FA tests on prod | ||
| prod_auth_key = | ||
|
|
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.