https://github.com/ntueeboyz/flaskrrr-and-tests
Web login page and API/UI tests (interview)
https://github.com/ntueeboyz/flaskrrr-and-tests
flask robot-framework
Last synced: 6 months ago
JSON representation
Web login page and API/UI tests (interview)
- Host: GitHub
- URL: https://github.com/ntueeboyz/flaskrrr-and-tests
- Owner: ntueeboyz
- Created: 2020-11-14T12:37:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-23T09:12:17.000Z (over 4 years ago)
- Last Synced: 2025-04-06T17:35:03.542Z (over 1 year ago)
- Topics: flask, robot-framework
- Language: Python
- Homepage:
- Size: 8.15 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flaskrrr-and-tests
Web login system and API/UI tests
## QuickStart
No one likes looooong README, so let's begin:
### Version
python 3.9.0
Flask 1.1.2
Robot Framework 3.2.2 (Python 3.9.0 on darwin)
### Setup
```
git clone https://github.com/NTUEEboy/flaskrrr-and-tests.git
```
Just follow the tutorial of [Flask website](https://flask.palletsprojects.com/en/1.1.x/) to creat a virtual env. under the project
```
$ python -m venv venv
```
Activate the environment
```
$ . venv/bin/activate
```
Install required packages: Flask and [Robot Framework](https://robotframework.org/).
```
$ pip install -r requirements.txt
```
Make sure you have the same chrome version with [ChromeDriver](https://chromedriver.chromium.org/)(88) in this [repository](https://github.com/NTUEEboy/flaskrrr-and-tests/blob/master/chromedriver_binary/chromedriver).
### How to run
Check Internet is connected in your side because Bootstrap and jQuert CND are used.
The test scripts are in the [tests](https://github.com/NTUEEboy/flaskrrr-and-tests/tree/master/loginApp/tests) direectory.
Start the localhost web server
```
$ export FLASK_APP=main.py
$ flask run
```
The api test for the login function
```
$ python -m unittest -v tests/test_basic.py
```
or if you have `pytest` installed
```
$ pytest
```
The UI test in different cases
```
$ robot tests/ui_tests/login.robot
```