Skip to content

Commit 3d560c1

Browse files
committed
[tl-tests] initial commit , refactor project to python language
1 parent edd0e06 commit 3d560c1

11 files changed

Lines changed: 657 additions & 0 deletions

File tree

.gitignore

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*.cover
46+
.hypothesis/
47+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
54+
local_settings.py
55+
56+
# Flask stuff:
57+
instance/
58+
.webassets-cache
59+
60+
# Scrapy stuff:
61+
.scrapy
62+
63+
# Sphinx documentation
64+
docs/_build/
65+
66+
# PyBuilder
67+
target/
68+
69+
# Jupyter Notebook
70+
.ipynb_checkpoints
71+
72+
# pyenv
73+
.python-version
74+
75+
# celery beat schedule file
76+
celerybeat-schedule
77+
78+
# SageMath parsed files
79+
*.sage.py
80+
81+
# Environments
82+
.env
83+
.venv
84+
env/
85+
venv/
86+
ENV/
87+
88+
# Spyder project settings
89+
.spyderproject
90+
.spyproject
91+
92+
# Rope project settings
93+
.ropeproject
94+
95+
# mkdocs documentation
96+
/site
97+
98+
# mypy
99+
.mypy_cache/
100+
101+
# Sonar
102+
.sonar/
103+
104+
# TESTLINKTESTS ignores
105+
testlinktests/configs/settings.json
106+
tests/reports/*
107+
tests/reports/coverage/*
108+
tests/reports/benchmarks/benchmark.*.svg
109+
# Visual Studio
110+
.vs/
111+
# Visual code
112+
.vscode/

.travis.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
env:
2+
global:
3+
# GITHUB_TOKEN
4+
- secure: LYqe4kN1i8BqVEAO8fdO+CYrx9z8h1ab+NxCgYubLcP70DZoKNRj1/egULOd3uvDHFigFVeaACRR6vUQnHbHsffSkMr4nqwOeJMbxOdspHPuA4oMUy5RZKRC7P+v6Dlwpg4Psg/VsEnP6lHWb/RbosBE8tU8ukewD14EU3o29Ql+lBfvvOW/81UTGokMQa1zrW9o70oEaTYqePT9YzM9UcKgukshYtcxKE3oiwLm3fB8zBAUJwzkEvBGNpXjqBEDCUjrS80CqgY3BRsPfnPk90LgjeORaZKoP1f/bZE4UtgeESK0xpWsKEcDCRkSfGxYw8rD7nwc6H5LiCeoS87oQpUCMsoijmGL1yLrBBMIRAWoMC/o+h/QI5bb+IyLba6KLihY4LpExnWj2V8Mh6qs6AeV8v/Dl1WdyIi72WIkMBrmVrOhtoJJ45QaZJbrwSMeM4/ShS5NdiLFnGKeYOjMJ+DQZa+//SIwnvsOegm918TmOZqCr2YabI6WYixOzYjQPvI2KliZGekaX9uSNxVwoWZDE8jvdhvBWtHsL6hMqAv5ehEJw1aseLwjEGHQjIY0YBqJI38QmFr0vro6/9U2EehXHeW3ycCrPguQJ50nIK/DwiGMadUhrxU0xfZ6+TfFpGY0RivEPLD+Cup9C5oVFAppPJncdBdXUqouR90/8NI=
5+
addons:
6+
sonarqube:
7+
branches:
8+
- master
9+
language: python
10+
matrix:
11+
include:
12+
- os: linux
13+
sudo;: required
14+
python: 2.7
15+
env: TOXENV=py27
16+
- os: linux
17+
sudo;: required
18+
python: 3.4
19+
env: TOXENV=py34
20+
- os: linux
21+
sudo;: required
22+
python: 3.5
23+
env: TOXENV=py35
24+
- os: linux
25+
sudo;: required
26+
python: 3.6
27+
env: TOXENV=py36
28+
29+
before_install:
30+
- pip freeze
31+
install:
32+
- pip install tox
33+
script:
34+
- tox -e "{$TOXENV},flake8"
35+
after_script:
36+
- python setup.py sdist

README.rst

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
Testlink-tests
2+
==============
3+
4+
5+
.. image:: https://img.shields.io/github/issues/TestLinkOpenSourceTRMS/testlink-tests.svg
6+
:alt: Issues on Github
7+
:target: https://github.com/TestLinkOpenSourceTRMS/testlink-tests/issues
8+
9+
.. image:: https://img.shields.io/github/issues-pr/TestLinkOpenSourceTRMS/testlink-tests.svg
10+
:alt: Pull Request opened on Github
11+
:target: https://github.com/TestLinkOpenSourceTRMS/testlink-tests/issues
12+
13+
.. image:: https://img.shields.io/github/release/TestLinkOpenSourceTRMS/testlink-tests.svg
14+
:alt: Release version on Github
15+
:target: https://github.com/TestLinkOpenSourceTRMS/testlink-tests/releases/latest
16+
17+
.. image:: https://img.shields.io/github/release-date/TestLinkOpenSourceTRMS/testlink-tests.svg
18+
:alt: Release date on Github
19+
:target: https://github.com/TestLinkOpenSourceTRMS/testlink-tests/releases/latest
20+
21+
22+
+-----------------------+-----------------------+--------------------------+--------------------------+------------------------------+
23+
| Branch | TravisCI | Appveyor | CircleCi - Docker | CodeClimate |
24+
+=======================+=======================+==========================+==========================+==============================+
25+
| master | |master_ci_travis| | |master_ci_appveyor| | |master_ci_circleci| | |master_ci_codeclimate| |
26+
+-----------------------+-----------------------+--------------------------+--------------------------+------------------------------+
27+
28+
29+
Python tested versions
30+
----------------------
31+
32+
+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+
33+
| **3.6** | **3.5** | **3.4** | **3.3** | **3.2** | **2.7** |
34+
+===================+===================+===================+===================+===================+===================+
35+
| *Supported* | *Supported* | *Supported* | *Not Supported* | *Not Supported* | *Supported* |
36+
+-------------------+-------------------+-------------------+-------------------+-------------------+-------------------+
37+
38+
39+
Prerequisites
40+
-------------
41+
42+
+ Prerequisites : ``TODO: make sense``
43+
44+
45+
How to install ?
46+
----------------
47+
48+
+ Install from PIP : ``pip install testlink-tests``
49+
50+
+ Install from setup.py file : ``python setup.py install``
51+
52+
53+
54+
How to exec tests ?
55+
-------------------
56+
57+
+ Tests from setup.py file : ``python setup.py test``
58+
59+
+ Install from PIP file : ``pip install tox``
60+
+ Tests from tox : ``tox -l && tox -e TOX_ENV_NAME`` ( *see tox.ini file to get environment names* )
61+
62+
63+
+---------------------+--------------------------------+
64+
| TOX Env name | Env description |
65+
+=====================+================================+
66+
| py27,py34,py35,py36 | Python supported versions |
67+
+---------------------+--------------------------------+
68+
| flake8 | Exec linter in qalab/ tests/ |
69+
+---------------------+--------------------------------+
70+
| coverage | Generate XML and HTML reports |
71+
+---------------------+--------------------------------+
72+
| docs | Generate doc HTML in /docs |
73+
+---------------------+--------------------------------+
74+
75+
Configuration File
76+
~~~~~~~~~~~~~~~~~~
77+
78+
79+
::
80+
81+
{
82+
"connection":{
83+
"is_https": false,
84+
"host": "qalab.tk",
85+
"port": 86
86+
},
87+
"dev_key": "1bfd2ef4ceda22b482b12f2b25457495",
88+
"log_level":"DEBUG",
89+
}
90+
91+
Getting Started
92+
~~~~~~~~~~~~~~~
93+
94+
*Just starting example of usage before read* `Usage Guide`_.
95+
96+
97+
.. _Usage Guide: USAGE.rst
98+
.. |master_ci_travis| image:: http://demo.testlink.org
99+
.. |master_ci_appveyor| image:: http://demo.testlink.org
100+
.. |master_ci_circleci| image:: http://demo.testlink.org
101+
.. |master_ci_codeclimate| image:: http://demo.testlink.org

USAGE.rst

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
Usage Guide
2+
===========
3+
4+
Usage ( *XMLRPC* )
5+
******************
6+
7+
+ 1. Create JSON configuration ( runtime or read from file, *read config section* )
8+
+ 2. Instance **testlink_manager** object ``testlink_manager = TLManager(settings=my_json_config)``
9+
+ 3. Use some *method name with prefix* '**api_**'
10+
11+
**api_login**
12+
+++++++++++++
13+
14+
* **XMLRPC**: *call to method named* '*tl.checkDevKey*'
15+
* **Description** : check if dev_key it's valid
16+
17+
**api_tprojects**
18+
+++++++++++++++++
19+
20+
* **XMLRPC**: *call to method named* '*tl.getProjects*'
21+
* **Description** : get all test projects
22+
23+
24+
**api_tproject**
25+
++++++++++++++++
26+
27+
* **XMLRPC**: *call to method named* '*tl.getTestProjectByName*'
28+
* **Description** : get one test project filtered by name
29+
30+
**api_tproject_tplans**
31+
+++++++++++++++++++++++
32+
33+
* **XMLRPC**: *call to method named* '*tl.getProjectTestPlans*'
34+
* **Description** : get all test plans for one test project
35+
36+
**api_tproject_tsuites_first_level**
37+
++++++++++++++++++++++++++++++++++++
38+
39+
* **XMLRPC**: *call to method named* '*tl.getFirstLevelTestSuitesForTestProject*'
40+
* **Description** : get all test suites on first level for one test project
41+
42+
**api_tplan**
43+
+++++++++++++
44+
45+
* **XMLRPC**: *call to method named* '*tl.getTestPlanByName*'
46+
* **Description** : get one test plan filtered by project and plan names
47+
48+
**api_tplan_platforms**
49+
+++++++++++++++++++++++
50+
51+
* **XMLRPC**: *call to method named* '*tl.getTestPlanPlatforms*'
52+
* **Description** : get one test plan filtered by project and plan names
53+
54+
**api_tplan_builds**
55+
++++++++++++++++++++
56+
57+
* **XMLRPC**: *call to method named* '*tl.getBuildsForTestPlan*'
58+
* **Description** : get all builds for test project filtered by id
59+
60+
**api_tplan_tsuites**
61+
+++++++++++++++++++++
62+
63+
* **XMLRPC**: *call to method named* '*tl.getTestSuitesForTestPlan*'
64+
* **Description** : get all test suites assigned to test plan filtered by id
65+
66+
**api_tplan_tcases**
67+
++++++++++++++++++++
68+
69+
* **XMLRPC**: *call to method named* '*tl.getTestCasesForTestPlan*'
70+
* **Description** : get all test cases assigned to test plan filtered by id
71+
72+
**api_tplan_build_latest**
73+
++++++++++++++++++++++++++
74+
75+
* **XMLRPC**: *call to method named* '*tl.getLatestBuildForTestPlan*'
76+
* **Description** : get latest build by choosing the maximum build id for a specific test plan id
77+
78+
**api_tplan_totals**
79+
++++++++++++++++++++
80+
81+
* **XMLRPC**: *call to method named* '*tl.getTotalsForTestPlan*'
82+
* **Description** : get totals for testplan filtered by id
83+
84+
**api_tsuite**
85+
++++++++++++++
86+
87+
* **XMLRPC**: *call to method named* '*tl.getTestSuiteByID*'
88+
* **Description** : get test suite filtered by id
89+
90+
**api_tsuite_tsuites**
91+
++++++++++++++++++++++
92+
93+
* **XMLRPC**: *call to method named* '*tl.getTestSuitesForTestSuite*'
94+
* **Description** : get test suites down of tree for one test suite filtered by id
95+
96+
**api_tcase**
97+
+++++++++++++
98+
99+
* **XMLRPC**: *call to method named* '*tl.getTestCase*'
100+
* **Description** : get test case filtered by id or external id
101+
102+
**api_tcase_by_name**
103+
+++++++++++++++++++++
104+
105+
* **XMLRPC**: *call to method named* '*tl.getTestCaseIDByName*'
106+
* **Description** : get test case filtered by name
107+
108+
**api_tcase_report**
109+
++++++++++++++++++++
110+
111+
* **XMLRPC**: *call to method named* '*tl.reportTCResult*'
112+
* **Description** : reports a result for a single test case
113+
114+
**api_user_exist**
115+
++++++++++++++++++
116+
117+
* **XMLRPC**: *call to method named* '*tl.doesUserExist*'
118+
* **Description** : check if user name it's valid
119+
120+
**api_about**
121+
+++++++++++++
122+
123+
* **XMLRPC**: *call to method named* '*tl.about*'
124+
* **Description** : get default message with author and testlink version
125+
126+
**api_say_hello**
127+
+++++++++++++++++
128+
129+
* **XMLRPC**: *call to method named* '*tl.sayHello*'
130+
* **Description** : get **'Hello!'** message
131+
132+
**api_ping**
133+
++++++++++++
134+
135+
* **XMLRPC**: *call to method named* '*tl.ping*'
136+
* **Description** : get **'Hello!'** message
137+
138+
**api_ping**
139+
++++++++++++
140+
141+
* **XMLRPC**: *call to method named* '*tl.repeat*'
142+
* **Description** : get **You said: 'your message here'** as message

0 commit comments

Comments
 (0)