Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

thanhmimi/autoAPI

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to run

Prepare environment

  • install python (3.6+)
  • special case for Debian-based Linux distros:
    • install packages:python python-dev python-libxml2 libxml2-dev python-libxslt1 libxslt1-dev libjpeg-dev zlib1g-dev
  • for MacOs install libxml and libxslt by brew or another package manager
  • install virtualenv see https://virtualenv.pypa.io/en/latest/installation.html (preferred)
  • checkout this repository from the bitbucket, cd to repo directory
  • activate virtualenv
    virtualenv -p python3.6 .env
    source .env/bin/activate
  • install requirements
    pip install -r requirements.txt
  • create file env.ini from file _env.ini in folder config/
    cp config/_env.ini config/env.ini

if you need html reports locally

run tests

For running tests command py.test is used. To find out actual info about options and parameters, just use py.test --help. Basically, the command for running tests looks like

    pytest <tests_path> -s --alluredir=output <opts> 
 

where tests_path is like tests/twitch and opts are component-specific options.

Available options:

  • --env= if used, then staging of the corresponding venture will be tested. Actual values can be found in config/env.ini
  • --db_host= - database hostname
  • --db_user= - user who can connect to database
  • --db_password= - database user password

Actual list of command-line parameters see at tests/conftest.py:option_list.

All parameters can be filled up in the [local] section in the env.ini filed

usage

  • develop a test, put it to correct service
  • run test
    pytest --api_url=http://api.greentech-vn.com tests/api/rewards/ --alluredir=output
  • generate report
    allure generate output

where output is the directory which is defined at --aluredir option when running test

  • open report
    allure report open

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.