Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaktestowac/gad-gui-api-demo
GAD๐ฆ - Application for learning testing GUI and API
https://github.com/jaktestowac/gad-gui-api-demo
api gui testing
Last synced: 19 days ago
JSON representation
GAD๐ฆ - Application for learning testing GUI and API
- Host: GitHub
- URL: https://github.com/jaktestowac/gad-gui-api-demo
- Owner: jaktestowac
- License: gpl-3.0
- Created: 2023-06-06T12:29:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-13T14:55:30.000Z (8 months ago)
- Last Synced: 2024-04-14T04:53:27.585Z (8 months ago)
- Topics: api, gui, testing
- Language: JavaScript
- Homepage: https://jaktestowac.pl/about-gad
- Size: 9.53 MB
- Stars: 8
- Watchers: 7
- Forks: 5
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
This application (called **๐ฆ GAD**) was prepared and developed **only for testing purposes**. It provides:
- GUI
- REST API
- Swagger DocThis application contains simple logic, statistics, charts, games, different resources, **deliberately prepared bugs**๐ and various challenges.
Thanks to this configuration, we are able to **reflect real project reality**๐
P.S. In addition, the application has some **serious design flaws** - I wonder if you will notice them?๐
# Features
Features of **๐ฆ GAD**:
- **GUI** (front-end)
- **REST API** (back-end)
- **Swagger** Doc
- Simple **DataBase** (JSON) with REST API endpoints to clear/restore all data
- **Authentication** and **Authorization**
- **User** <-> resources logic (calculations, statistics)
- Different **data presentation** (charts, tables etc.)
- **Feature flags** configurable from UI!
- **Bug flags** to enable/disable different bugs - configurable from UI!
- **Dynamic config**
- **Challenging elements for test automation** (iframes, file uploads, drag&drop, likes, labels, surveys, banners, pop-ups, logic on front-end and back-end, dynamic elements, games etc.)
- **Admins "backoffice"** with additional tools and functionalities (DB reset, SQL Playground)# Deployment
Instructions how to deploy presented service to various free hosting sites.
- [Deploy to Local](#deploy-to-local) (recommended)
- [Deploy to Glitch](#deploy-to-glitch)
- [Deploy to Render](#deploy-to-render)
- [Deploy using Docker image](#deploy-using-docker-image)## Deploy on **Local**
Requirements:
- **node.js** installed in the system
- tested on node.js **v18** and **v20**
- **git** installed in the system### First use
Steps:
1. Open the project root directory in cmd/terminal
1. Clone the repository using `git clone ...`
- this is the **preferred way** to use this application
1. Run `npm i`
- to install modules (don't use node.js global packages!)
1. Run `npm run start`
- to start GADThe application will be available at `http://localhost:3000`
### Update version
#### If You are using zip package
Steps:
1. Download zipped repository
1. Unzip and replace Your local instance of GAD
1. Run `npm i` in root directory
- to install new modules
1. Run `npm run start`
- to start GAD#### If You are using cloned repository
Steps:
1. Open the project root directory in cmd/terminal
1. Pull latest changes using `git pull`
1. Run `npm i`
- to install new modules
1. Run `npm run start`
- to start GAD### Update version if You have any changes (e.g. in database)
One possibility is to reset all Your local changes and pull new version.Using this method **You will lose all Your local changes and data**!
Steps:
1. Open the project root directory in cmd/terminal
1. Reset local changes and pull latest changes using:
```
git reset --hard HEAD
git pull
```
1. Run `npm i`
- to install new modules
1. Run `npm run start`
- to start GAD### CLI options
| Option | Description |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| READ_ONLY=1 | Run in Read Only mode. This disables all POST, PUT, and PATCH methods, besides login. |
| PORT=3001 | Run on selected port. GAD runs on default port `3000`. |
| DB="db_name" | Use selected database file. GAD uses `db.json` as default database. Example (for PowerShell): `$env:DB="db-base-big"; npm run start` |โ ๏ธ Warning: Any environment variables set in the terminal will be used by the application. If you want to run the application without any options, make sure to clear the environment variables.
#### Running CLI options
To run GAD with **CLI options**, use the following commands e.g.:
PowerShell:
```PowerShell
$env:PORT=3001; npm run start
```Bash:
```Bash
PORT=3001 npm run start
```Windows Cmd:
```
set PORT=3001 && npm run start
```## Deploy to **Glitch**
No account needed - but your project will be deleted in 5 days.
After clicking button below wait a minute or two to finish deployment.
[![Remix on Glitch](https://cdn.glitch.me/2703baf2-b643-4da7-ab91-7ee2a2d00b5b%2Fremix-button-v2.svg)](https://glitch.com/edit/#!/import/github/jaktestowac/gad-gui-api-demo)
To see website:
- go to bottom buttons
- click `๐PREVIEW`
- choose `๐ฏPreview in a new window`When deploying the GAD application on Glitch, please be aware that the application may not function fully due to the limitations of the Glitch platform. However, we are making every effort to ensure the highest possible compatibility.
## Deploy to **Render**
- Create free account on: https://dashboard.render.com/register
- After successful registration hit the button:[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/jaktestowac/gad-gui-api-demo)
- name your app
- hit `Apply`
- wait a while and click link to project `GUI API Demo`
- click link to open app (under project name and repository)
- enjoy 750 free hours of service per monthWhen deploying the GAD application on Render, please be aware that the application may not function fully due to the limitations of the Render platform. However, we are making every effort to ensure the highest possible compatibility.
## Deploy using Docker image
This method can be used:
- locally
- in CI/CD services (GitHub Actions, GitLab CI etc.)### Prerequisites:
On local environment:
- latest Docker is installed
### Running
Just run following command to get latest image:
```
docker run -p 3000:3000 -d jaktestowac/gad
```or specific version:
```
docker run -p 3000:3000 -d jaktestowac/gad:2.5.5
```Application should be running under http://localhost:3000/
Images are available at:
[๐ hub.docker.com/repository/docker/jaktestowac](https://hub.docker.com/repository/docker/jaktestowac/gad/general)