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

https://github.com/markuusche/mobile.playground

💰 casino game [ mobile mode emulation ] automation
https://github.com/markuusche/mobile.playground

automation casino-games pytest testing

Last synced: 4 months ago
JSON representation

💰 casino game [ mobile mode emulation ] automation

Awesome Lists containing this project

README

          

> [!NOTE]
> _It is expected that you cannot run this project without the api base url and its endpoints._
> _The purpose of this project is to demonstrate that I've developed something for personal use and future reference._
> _If you have any questions, feel free to contact me through one of my socials on my github profile._

![](https://cdn-icons-png.freepik.com/128/9414/9414933.png)

mobile.playground (casino)
======
QA Automation Test

Project Dependencies
---------------------

- `python`
- `selenium`
- `pytest`
- `pyyaml`
- `requests`
- `faker`
- `gspread`
- `oauth2client`
- `google-api-python-client`
- `opencv-python`
- `pytesseract`
- `pyperclip`

Coverage
---------

* [Mobile]

Pre-requisites
--------------

1. Python 3 (Make sure python is added to your system PATH)
2. Python Extension (VSCode)
3. pip
4. virtualenv
6. [tesseract](https://github.com/UB-Mannheim/tesseract/wiki)
7. creds.json
------------------------------------------------
Setting up first run on your local machine
------------------------------------------

1. Clone this project on your local machine

```
https://github.com/markuusche/mobile.playground
```

3. Open a terminal inside your local clone of the repository.

4. Using python's virtualenv, create a virtual environment inside the project.

Install:
```
pip install virtualenv
```
Create a virtual environment:
```
virtualenv venv
```

where venv is the name of the virtual environment you are creating.
It is also recommended to use __venv__ as the name of your virtual environment
cause this is the recognized file exception on our ``.gitignore``

6. Activate the virtualenv you just created.

* Windows CMD
```bash
venv\Scripts\activate
```
* Windows Git Bash
```bash
source venv/scripts/activate
```
* Windows Powershell
```bash
venv\Scripts\activate.ps1
```
* MacOS/Linux
```bash
source venv/bin/activate
```

7. Install the project dependencies.
```bash
pip install -r requirements.txt
```
8. Create the needed folder for the run:
```bash
mkdir -p sreenshots/decoded
```
```bash
mkdir logs
```

Thats it! You have setup your local environment to run test for this project.

Run the script in visual mode (_Recommended_)
> [!IMPORTANT]
> this command already includes verbosity, stdout & stderr and quiet flags. See [pytest.ini](https://github.com/markuusche/mobile.playground/blob/main/pytest.ini)
```bash
pytest
```

Run the script in headless mode
```bash
pytest --headless
```

Run the script with a gsreport
> [!NOTE]
> all test status will be recorded in the google sheet.
```bash
pytest --gsreport
```

> [!CAUTION]
> Be aware that the test script might be flaky sometimes.

> [!IMPORTANT]
> If the test case failed on the first run. Re-run the test case base on what the test case that failed.

> For ex. the baccarat game failed, you can run this specific test case with:
> `` pytest -k test_baccarat``.

> If one or several test case failed, verify or replicate if the test case really failed.