Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f2115a5
QA-4901 Data dictionary functionality and powerbi integration functi…
sameena1415 Sep 2, 2025
1cbed67
Update user_inputs.py
sameena1415 Sep 19, 2025
bfe937b
Update power_bi_page.py
sameena1415 Sep 19, 2025
2169efd
changes to the data dictionary code
sameena1415 Sep 23, 2025
1465221
few code changes for data dictionary functionality
sameena1415 Sep 23, 2025
9f782a7
Code changes for data dictionary and powerbi test plans
sameena1415 Sep 26, 2025
27ce19f
Code changes for data dictionary and powerbi test plans
sameena1415 Sep 26, 2025
df2c44b
Code changes for data dictionary and powerbi test plans
sameena1415 Sep 26, 2025
575ef39
PR review comments -code changes for both data dictionary and powerbi
sameena1415 Oct 6, 2025
6658f21
Merge branch 'master' into QA-4901-script-addition-automation-of-data…
kbo001 Oct 21, 2025
31d2bae
Added cosemtic changes for Data dictionary and powerbi functionality
sameena1415 Oct 22, 2025
0779030
Mergx branch 'QA-4901-script-addition-automation-of-data-dictionary-t…
sameena1415 Oct 22, 2025
a6da745
deleted unwanted files
sameena1415 Oct 22, 2025
4d1efbc
Merge branch 'master' of https://github.com/dimagi/dimagi-qa into QA-…
kbo001 Oct 22, 2025
067f54b
QA-4901 updated ymls for data dictionary and power bi
kbo001 Oct 22, 2025
7346163
Merge branch 'master' of https://github.com/dimagi/dimagi-qa into QA-…
kbo001 Oct 22, 2025
75228b2
QA-4901 updated Power bi conftest and requires.txt
kbo001 Oct 22, 2025
eaae4b2
QA-4901 fixing power bi execution
kbo001 Oct 22, 2025
2ced247
QA-4901 added pyotp to requires
kbo001 Oct 22, 2025
9d361c0
QA-4901 updated gitignore
kbo001 Oct 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/power-bi-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
echo "matrix environment: ${{ matrix.environment }}"
echo "NOW=$(date +'%m-%d %H:%M')" >> $GITHUB_ENV
echo ${{env.NOW}}
pytest -v --rootdir= Features/Powerbi_integration_exports/testCases -n 0 --dist=loadfile --reruns 1 --html=power_bi_reports_${{ matrix.environment }}.html
pytest -v --rootdir= Features/Powerbi_integration_exports/testCases -n 1 --dist=loadfile --reruns 1 --html=power_bi_reports_${{ matrix.environment }}.html


- name: Parse test counts
Expand Down
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ MANIFEST
*.manifest
*.spec

*/slack_charts/*

#Ignoring compliled files of RequestAPI
.idea/
pytest_html_report.html
Expand Down Expand Up @@ -238,6 +240,17 @@ Features/Lookuptable/settings.cfg
Features/Lookuptable/report.html
Features/Lookuptable/testCases/report.html

#Ignoring compliled files of DataDictionary
Features/DataDictionary/testCases/report.html
Features/DataDictionary/testCases/slack_charts
Features/DataDictionary/test_cases/report.html

#Ignoring compliled files of Powerbi_integration_exports
Features/Powerbi_integration_exports/settings.cfg
Features/Powerbi_integration_exports/report.html
Features/Powerbi_integration_exports/test_cases/report.html
Features/Powerbi_integration_exports/testCases/slack_charts

#Ignoring compliled files of QA_Requests
QA_Requests/BHAStressTest/settings.cfg
QA_Requests/BHAStressTest/user_inputs/*.csv
Expand Down Expand Up @@ -277,6 +290,8 @@ LocustScripts/update-scripts/project-config/co-carecoordination-perf/mobile_work
/POCs/PercyWebApps/settings.cfg
/POCs/VisualComparison/settings.cfg



USH_Apps/WeeklyBHACleanup/testCases/report.html
USH_Apps/WeeklyBHACleanup/report.html
USH_Apps/WeeklyBHACleanup/report_*
Expand Down
57 changes: 57 additions & 0 deletions Features/DataDictionary/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## Commcare Data Dictionary Test Script

These tests ensure that the Data Dictionary (https://dimagi.atlassian.net/wiki/spaces/commcarepublic/pages/2143944977/Data+Dictionary)features work as expected and that there are no regressions
The automated tests comprises of the Data dictionary functionality.](https://docs.google.com/spreadsheets/d/1Ixw1PC9PVpqYOlP7aq9a86pC0wZaJVgGNVL_4h9KLbM/edit#gid=195915568)
## 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/DataDictionary/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 [DataDictionary](https://github.com/dimagi/dimagi-qa/actions/lookuptable.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.
22 changes: 22 additions & 0 deletions Features/DataDictionary/requires.txt
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
12 changes: 12 additions & 0 deletions Features/DataDictionary/settings-sample.cfg
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.
Loading
Loading