Skip to content

alexbeatnik/dp-151

Repository files navigation

DP-151 group project

The purpose of this repository is to provide automated test suite for OpenCart e-commerce platform.

Build Status Code style: black

Project structure

The following directories tree outlines the most important information about project structure:

.
├── README.md                 <= This file which documents the project.
├── archive                   <= pyATS reports directory (excluded from git)
├── oct                       <= a root package
│   └── tests                 <= a root package for all automated tests
│       ├── api               <= API-related tests
│       ├── deployment        <= deployment-related tests
│       └── web               <= WEB-related tests
├── suite.py                  <= a job file to run all tests
└── requirements.txt          <= Python packages for automated tests execution

Usage of automated tests

Installation

Please use Python 3.6.5 for the test execution.

Before running any command, please install required Python's dependencies with

pip install -r requirements.txt

Execution

If you need to run whole tests suite, please run

python suite.py -testbed_file testbed.yaml

If you need to run a particular test, please run

export PYTHONPATH=$(pwd):${PYTHONPATH}
python oct/tests/web/sample.py

where oct/tests/web/sample.py has to be replaced with desired test module.

Please note! If you run WEB tests, please make sure you run the chromedriver binary first.

Development of automated tests

All contributors have to follow Google Python's style guide until it conflicts with the configured tools for code quality evaluation.

Also, docstrings are optional for the project.

Type Hints are mandatory.

Installation

Please install required Python's dependencies with

pip install -r requirements-dev.txt

Code formatting

We use Black for the auto-formatting of the code. This allows supporting of common code style across all contributors and will reduce amount of lines for either merge conflicts or review.

Please run black . to reformat the code according to the projects convention.

Code assessment

We use some tools to guarantee the quality of the code.

  1. Black checks the quality of the code formatting.
  2. Pylint analyzes the code and assesses it accordingly.
  3. flake8 applies some style checks on the code.
  4. pydocstyle analyses the quality of docstrings (executed via flake8).
  5. Mypy checks static types.

In order to run code assessment, you need to run ./code-assessment.sh command and make sure that there is no message like Code assessment is failed! Please fix errors!!!. If you face the massage, please fix all violations.

Deploy and destroy application

If you want to deploy the application to localhost, you need to run in the terminal

sudo docker-compose up

After that you can enter in the browser's search field

https://127.0.0.1 or https://localhost

and use the application. If you need to destroy application, run in the terminal

sudo docker-compose down

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.0%
  • Shell 1.0%