https://github.com/pprzetacznik/bdd-test-framework
Sample BDD test framework for Flask application
https://github.com/pprzetacznik/bdd-test-framework
bdd flask github-actions python
Last synced: about 1 month ago
JSON representation
Sample BDD test framework for Flask application
- Host: GitHub
- URL: https://github.com/pprzetacznik/bdd-test-framework
- Owner: pprzetacznik
- License: other
- Created: 2023-06-28T17:56:00.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-07T12:59:18.000Z (almost 2 years ago)
- Last Synced: 2025-02-03T11:51:08.812Z (3 months ago)
- Topics: bdd, flask, github-actions, python
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# My Application with BDD Test framework
## Installation
```
$ pip install -r requirements.txt
```## Run
```
$ ./run.sh run
$ FLASK_DEBUG=1 ./run.sh
```## Run unit tests
```
$ ./run_tests.sh
```## Run automation tests
Run them with:
```
$ ./run_bdd_tests.sh
============================= test session starts =============================
platform darwin -- Python 3.11.3, pytest-7.4.0, pluggy-1.2.0 -- ...
cachedir: .pytest_cache
rootdir: ...
configfile: pytest.ini
plugins: cov-4.1.0, bdd-6.1.1
collected 1 item...
{'msg': 'You are not logged in'}
{'msg': 'Logged successfully'}Feature: Users
Scenario: Check log in
Given user opens index page
When user logs in with credentials
Then user successfull message is sent
PASSED---------- coverage: platform darwin, python 3.11.3-final-0 ----------
Name Stmts Miss Cover
----------------------------------------------
my_app/__init__.py 0 0 100%
my_app/autoapp.py 5 5 0%
my_app/server.py 22 2 91%
my_app/settings.py 12 0 100%
my_app/users/__init__.py 1 0 100%
my_app/users/views.py 14 2 86%
----------------------------------------------
TOTAL 54 9 83%============================== 1 passed in 0.08s ==============================
```