Skip to content

Commit

Permalink
Merge pull request #2 from TestLinkOpenSourceTRMS/initial_commit
Browse files Browse the repository at this point in the history
[tl-tests] initial commit , refactor proyect to python language
  • Loading branch information
netzulo authored Jul 4, 2018
2 parents edd0e06 + fa4a942 commit 4c17ae9
Show file tree
Hide file tree
Showing 14 changed files with 790 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Python CircleCI 2.0 configuration file
version: 2
jobs:
build:
environment:
CC_TEST_REPORTER_ID: 181a274c2c68483ff80af63a8a87e1f5fab71f37744eab702f25695501b5ca85
docker:
- image: circleci/python:3.6.1

working_directory: ~/repo

steps:
- checkout
- run:
name: Install dependencies
command: |
# CI, CircleCI dependencies
python3 -m venv venv
. venv/bin/activate
# CI, codeclimate dependencies
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
pip install codeclimate-test-reporter
# project dependencies
pip install tox
pip install coverage==4.2
- run:
name: Install project
command: |
. venv/bin/activate
python setup.py install
- run:
name: Before Tests
command: |
./cc-test-reporter before-build
- run:
name: Run Tests
command: |
. venv/bin/activate
tox -e coverage,flake8
- run:
name: After Tests
command: |
. venv/bin/activate
ls -ltra tests/reports/
codeclimate-test-reporter --token $CC_TEST_REPORTER_ID --file .coverage
- store_artifacts:
path: dist
destination: dist
112 changes: 112 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# Sonar
.sonar/

# TESTLINKTESTS ignores
testlinktests/configs/settings.json
tests/reports/*
tests/reports/coverage/*
tests/reports/benchmarks/benchmark.*.svg
# Visual Studio
.vs/
# Visual code
.vscode/
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
env:
global:
# GITHUB_TOKEN
- secure: LYqe4kN1i8BqVEAO8fdO+CYrx9z8h1ab+NxCgYubLcP70DZoKNRj1/egULOd3uvDHFigFVeaACRR6vUQnHbHsffSkMr4nqwOeJMbxOdspHPuA4oMUy5RZKRC7P+v6Dlwpg4Psg/VsEnP6lHWb/RbosBE8tU8ukewD14EU3o29Ql+lBfvvOW/81UTGokMQa1zrW9o70oEaTYqePT9YzM9UcKgukshYtcxKE3oiwLm3fB8zBAUJwzkEvBGNpXjqBEDCUjrS80CqgY3BRsPfnPk90LgjeORaZKoP1f/bZE4UtgeESK0xpWsKEcDCRkSfGxYw8rD7nwc6H5LiCeoS87oQpUCMsoijmGL1yLrBBMIRAWoMC/o+h/QI5bb+IyLba6KLihY4LpExnWj2V8Mh6qs6AeV8v/Dl1WdyIi72WIkMBrmVrOhtoJJ45QaZJbrwSMeM4/ShS5NdiLFnGKeYOjMJ+DQZa+//SIwnvsOegm918TmOZqCr2YabI6WYixOzYjQPvI2KliZGekaX9uSNxVwoWZDE8jvdhvBWtHsL6hMqAv5ehEJw1aseLwjEGHQjIY0YBqJI38QmFr0vro6/9U2EehXHeW3ycCrPguQJ50nIK/DwiGMadUhrxU0xfZ6+TfFpGY0RivEPLD+Cup9C5oVFAppPJncdBdXUqouR90/8NI=
addons:
sonarqube:
branches:
- master
language: python
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:
- pip freeze
install:
- pip install tox
script:
- tox -e "{$TOXENV},flake8"
after_script:
- python setup.py sdist
105 changes: 105 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
Testlink-tests
==============


.. image:: https://img.shields.io/github/issues/TestLinkOpenSourceTRMS/testlink-tests.svg
:alt: Issues on Github
:target: https://github.com/TestLinkOpenSourceTRMS/testlink-tests/issues

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

.. image:: https://img.shields.io/github/release/TestLinkOpenSourceTRMS/testlink-tests.svg
:alt: Release version on Github
:target: https://github.com/TestLinkOpenSourceTRMS/testlink-tests/releases/latest

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


+-----------------------+-----------------------+--------------------------+--------------------------+------------------------------+
| Branch | TravisCI | Appveyor | CircleCi - Docker | CodeClimate |
+=======================+=======================+==========================+==========================+==============================+
| master | |master_ci_travis| | |master_ci_appveyor| | |master_ci_circleci| | |master_ci_codeclimate| |
+-----------------------+-----------------------+--------------------------+--------------------------+------------------------------+


Python tested versions
----------------------

+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+
| **3.6** | **3.5** | **3.4** | **3.3** | **3.2** | **2.7** |
+===================+===================+===================+===================+===================+===================+
| *Supported* | *Supported* | *Supported* | *Not Supported* | *Not Supported* | *Supported* |
+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+


Prerequisites
-------------

+ Prerequisites : ``TODO: make sense``


How to install ?
----------------

+ Install from PIP : ``pip install testlinktests``

+ Install from setup.py file : ``python setup.py install``



How to exec tests ?
-------------------

+ Tests from setup.py file : ``python setup.py test``

+ Install from PIP file : ``pip install tox``
+ Tests from tox : ``tox -l && tox -e TOX_ENV_NAME`` ( *see tox.ini file to get environment names* )


+---------------------+--------------------------------+
| TOX Env name | Env description |
+=====================+================================+
| py27,py34,py35,py36 | Python supported versions |
+---------------------+--------------------------------+
| flake8 | Exec linter in qalab/ tests/ |
+---------------------+--------------------------------+
| coverage | Generate XML and HTML reports |
+---------------------+--------------------------------+
| docs | Generate doc HTML in /docs |
+---------------------+--------------------------------+

Configuration File
~~~~~~~~~~~~~~~~~~


::

{
"connection":{
"is_https": false,
"host": "qalab.tk",
"port": 86
},
"dev_key": "1bfd2ef4ceda22b482b12f2b25457495",
"log_level":"DEBUG",
}

Getting Started
~~~~~~~~~~~~~~~

*Just starting example of usage before read* `Usage Guide`_.


.. _Usage Guide: USAGE.rst
.. |master_ci_travis| image:: https://travis-ci.org/netzulo/testlink-tests.svg?branch=master
:target: https://travis-ci.org/netzulo/testlink-tests
.. |master_ci_appveyor| image:: https://ci.appveyor.com/api/projects/status/8kqf9o9mjgvte40j?svg=true
:target: https://ci.appveyor.com/project/netzulo/testlink-tests
.. |master_ci_circleci| image:: https://circleci.com/gh/netzulo/testlink-tests.svg?style=svg
:target: https://circleci.com/gh/netzulo/testlink-tests)
.. |master_ci_codeclimate| image:: https://api.codeclimate.com/v1/badges/84904556cd07ad4fcf00/maintainability
:target: https://codeclimate.com/github/netzulo/testlink-tests/maintainability
Loading

0 comments on commit 4c17ae9

Please sign in to comment.