An open API service indexing awesome lists of open source software.

https://github.com/dimagi/dimagi-qa-sureadhere

This repository is for SureAdhere Automation
https://github.com/dimagi/dimagi-qa-sureadhere

Last synced: 5 months ago
JSON representation

This repository is for SureAdhere Automation

Awesome Lists containing this project

README

          

# dimagi-qa-sureadhere

## SureAdhere Test Script

This script contains the happy paths workflows of the SureAdhere app. Here are the scripted [automated workflows.](https://docs.google.com/spreadsheets/d/1EE2S3J4i964P_C-FCFxxHUYNxK3iP6XEoyKVoeWvZzs/edit?gid=530160723#gid=530160723)

## Executing Scripts

### On Local Machine

#### Setting up the 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 testCases --browser=chrome --reruns 1 --dashboard --html=report.html

```
- You could also pass the following arguments
- ` -n auto --dist=loadfile` - This will run the tests parallelly in instances assigned automatically. 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.

### Trigger Manually on Gitaction

To manually trigger the script,
- Go to [SA Workflows action](https://github.com/dimagi/dimagi-qa-sureadhere/actions/workflows/sa-workflows.yml)
- Run workflow
- Use workflow from ```main```
- Use the environment as desired
- Run!

## Script Results

- Failures would be triggered on the Slack channel **##qa-sureadhere-automated-test-results**

image

- You should be able to find the zipped results in the **Artifacts** section, of the corresponding run (after a run is complete).

image