Skip to content

Commit

Permalink
[qalab] adding tox for qalab
Browse files Browse the repository at this point in the history
+ added matrix to travis builds
+ added tox envs #29
+ edited setup for fix pytest support #30
+ fix for README on pypi
+ added badges on README for github
  • Loading branch information
netzulo committed Dec 11, 2017
1 parent 61ee6cc commit 514d1dc
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 28 deletions.
36 changes: 23 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,33 @@ addons:
token:
secure: VtPxaodHoyiwC1P1RTlfb86qaEEg96/1CTvpDAR7dnT/EfzCR6OqSKbi+xRIYLyl+KLxTkmhvbwt83YseWXh5OCrq89USRA7tJBwubBj6TWf7B24xgsijusUtc/Xz/BbZFqM8wz8PnenpifHu4MNHwT6zXm5uYc3r2FK9BPJgjicNIHgj83m2r6TBJfK1n8mADOWBlxl/Y8m3kopPUzmb6GeM4cgykYp46KhgK/zviCUrVR1mTn2ilkqX3/KgG1FGUUSRzXgTaToqvzVSKE+qMq7Ai9N3arv8JcnMSpR9rl0ZCAC3shc2hCiB5WygpJmxya5v9YjDEb7RQQavUCEs/4LnDZbckufa4ImPHDyRACUBmg8Bsgu0XQKxEsl8RgDibSPz1Sd6HFAgr80OPUwBa562DJLv3qoYSB3/FmKaww/asxJC8sUhYZi2Xx3WrguZgn8jgQJfX51EnFNQrTEQdvfI5RE1s1vIfZXEx7yqCrcQj5nhM0CSLXG8MA7R1TpZCC/oGzl0dVhIr+O2kjfFtmjO9j3HxiTlMXSopMtMCRLQZoiu3ipCnIsyGROgeBbBg0Xq67qECD9k8hqrwlgnbjxlAgbGi3yMTb1nkh6AhCs59NwcUeGQoW/7k6UgA4p9rSHwEupbzmXKvn7brjca5Ih5wmlRne10qnFS+dLvMg=
language: python
python:
- '2.7'
- '3.3'
- '3.4'
- '3.5'
- '3.6'
matrix:
include:
- os: linux
sudo;: required
python: 2.7
env: TOXENV=py27
- os: linux
sudo;: required
python: 3.4
env: TOXENV=py34
- os: linux
sudo;: required
python: 3.5
env: TOXENV=py35
- os: linux
sudo;: required
python: 3.6
env: TOXENV=py36


before_install:
- git submodule update --init --recursive
- git submodule foreach git checkout master
- pip install -U tox-travis
- pip freeze
- python setup.py build
- python setup.py install
install:
- python qalab/qalab.py -sd selenium -m hub -i
- python qalab/qalab.py -sd selenium -m node -i
- python qalab/qalab.py -sd selendroid -m hub -i
- python qalab/qalab.py -sd selendroid -m node -i
- python qalab/qalab.py -sd appium -m node -i
- tox -e {$TOXENV,selenium-hub,selenium-node,selendroid-hub,selendroid-node,appium-node}
before_script:
- python qalab/qalab.py -sd selenium -m hub -s -p lin64 &
- python qalab/qalab.py -sd selenium -m node -s -p lin64 &
Expand Down
36 changes: 26 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
QA laboratory
=============

.. image:: https://img.shields.io/github/issues/netzulo/qalab.svg
:alt: Issues on Github
:target: https://github.com/netzulo/qalab/issues

.. image:: https://img.shields.io/github/issues-pr/netzulo/qalab.svg
:alt: Pull Request opened on Github
:target: https://github.com/netzulo/qalab/issues

.. image:: https://img.shields.io/github/release/netzulo/qalab.svg
:alt: Release version on Github
:target: https://github.com/netzulo/qalab/releases/latest

.. image:: https://img.shields.io/github/release-date/netzulo/qalab.svg
:alt: Release date on Github
:target: https://github.com/netzulo/qalab/releases/latest

+--------------+--------------------------+---------------------------+---------------------------+--------------------------+--------------------------+
| Branch name | QAlab | QAcode | QAdmin | QAdoc | QAtestlink |
+==============+==========================+===========================+===========================+==========================+==========================+
Expand Down Expand Up @@ -75,21 +91,21 @@ Command Usage
usage: qalab.py [-h] [-v] [-sd SERVER_DRIVER] [-m MODE] [-i] [-s]
[-p PLATFORM]

Performs selenium drivers operations
Performs selenium drivers operations

optional arguments:
-h, --help show this help message and exit
-v, --verbose verbose level... repeat up to three times.
-sd SERVER_DRIVER, --server_driver SERVER_DRIVER
optional arguments:
-h, --help show this help message and exit
-v, --verbose verbose level... repeat up to three times.
-sd SERVER_DRIVER, --server_driver SERVER_DRIVER
Select server driver, values are:
[selenium,selendroid, appium]
-m MODE, --mode MODE Select mode, values are: [hub, node]
-i, --install Download driver server jar
-s, --start Start driver server jar
-p PLATFORM, --platform PLATFORM
-m MODE, --mode MODE Select mode, values are: [hub, node]
-i, --install Download driver server jar
-s, --start Start driver server jar
-p PLATFORM, --platform PLATFORM
Select mode, values are: [lin32,lin64,win32,win64]

----- help us on , https://github.com/netzulo/qalab -------
----- help us on , https://github.com/netzulo/qalab -------


How to create HUB + Node ?
Expand Down
14 changes: 14 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[pytest]
addopts =
--verbose
--junit-xml=tests/reports/report_xunit.xml
--html=tests/reports/report_html.html
--self-contained-html
--cov=qalab tests/
--cov-report html:tests/reports/report_coverage_html/
--cov-report xml:tests/reports/report_coverage.xml
testpaths = tests
console_output_style = progress
python_files = suite_*_*.py
python_classes = Test*
python_functions = test_*_*
33 changes: 28 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from setuptools import setup, find_packages


VERSION = '0.1.0'
CURR_PATH = path.abspath(path.dirname(__file__))
# make works script on windows
sys.path.append(path.join(CURR_PATH, 'qalab'))
Expand All @@ -19,22 +20,45 @@ def readme():


setup(name='qalaboratory',
version='0.1.0',
version=VERSION,
packages=find_packages(exclude=['tests']),
description='QALAB, proyect manager for QA open source proyects',
long_description=readme(),
author='Netzulo Open Source',
author_email='[email protected]',
url='https://github.com/netzulo/qalab',
download_url='https://github.com/netzulo/qalab/tarball/v0.1.0',
download_url='https://github.com/netzulo/qalab/tarball/v{}'.format(
VERSION),
install_requires=[
'appdirs',
'packaging==16.8',
'pyparsing',
'six==1.10.0',
'nose==1.3.7',
'nose-testconfig==0.10',
'wget'
'wget',
'pytest'
],
setup_requires=[
'pytest-runner',
'tox',
],
tests_require=[
'pytest-html',
'pytest-dependency',
'pytest-cov',
],
scripts=['qalab/qalab.py'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
],
keywords=[
'testing',
Expand All @@ -57,6 +81,5 @@ def readme():
'selendroid',
'automation',
'pytest'
],
scripts=['qalab/qalab.py']
]
)
65 changes: 65 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[tox]
envlist =
py27,
py34,
py35,
py36,
flake8,
docs,
selenium-hub,
selenium-node,
selendroid-hub,
selendroid-node,
appium-node
[testenv:py27]
commands = python setup.py test
[testenv:py34]
commands = python setup.py test
[testenv:py35]
commands = python setup.py test
[testenv:py36]
commands = python setup.py test
[testenv:docs]
skip_install = true
commands = sphinx-build -b html qalab docs
deps =
Sphinx
[testenv:flake8]
skip_install = true
max-complexity = 10
commands = flake8 qalab/ tests/
deps =
flake8
flake8-docstrings>=0.2.7
flake8-import-order>=0.9
pep8-naming
flake8-colors
exclude =
.git,
__pycache__,
docs/source/conf.py,
old,
build,
dist,
logs,
.vscode,
.eggs,
.cache

# APP envs
[testenv:selenium-hub]
skip_install = true
commands = python qalab/qalab.py -sd selenium -m hub -i
[testenv:selenium-node]
skip_install = true
commands = python qalab/qalab.py -sd selenium -m node -i
[testenv:selendroid-hub]
skip_install = true
commands = python qalab/qalab.py -sd selendroid -m hub -i
[testenv:selendroid-node]
skip_install = true
commands = python qalab/qalab.py -sd selendroid -m node -i
[testenv:appium-node]
skip_install = true
commands = python qalab/qalab.py -sd appium -m node -i

0 comments on commit 514d1dc

Please sign in to comment.