Skip to main content

Qase TMS Python Api Client

Project description

Qase TMS Python Api Client

License

Installation

pip install qaseio

Usage

Qase.io uses API tokens to authenticate requests. You can view an manage your API keys in API tokens pages.

You must replace api_token with your personal API key.

from qaseio.client import QaseApi

qase = QaseApi("api_token")

Projects

Get All Projects

This method allows to retrieve all projects available for your account. You can you limit and offset params to paginate.

projects = qase.projects.get_all()

Get a specific project

This method allows to retrieve a specific project.

project = qase.projects.get("PRJCODE")

Check project exists

exists = qase.projects.exists("PRJCODE")

Create a new project

This method is used to create a new project through API.

from qaseio.client.models import ProjectCreate

project = qase.projects.create(
    ProjectCreate("Test project", "PRJCODE")
)

Test cases

Get all test cases

This method allows to retrieve all test cases stored in selected project. You can you limit and offset params to paginate.

test_cases = qase.cases.get_all("PRJCODE")

Get a specific test case

This method allows to retrieve a specific test case.

test_case = qase.cases.get("PRJCODE", 4)

Check test case exists

exists = qase.cases.exists("PRJCODE", 4)

Delete test case

This method completely deletes a test case from repository.

qase.cases.delete("PRJCODE", 4)

Test Suites

Get all test suites

This method allows to retrieve all test suites stored in selected project. You can you limit and offset params to paginate.

from qaseio.client.models import TestSuiteFilters

test_suites = qase.suites.get_all(
    "PRJCODE", filters=TestSuiteFilters(search="query")
)

Get a specific test suite

This method allows to retrieve a specific test suite.

test_suite = qase.suites.get("PRJCODE", 123)

Check test suite exists

exists = qase.suites.exists("PRJCODE", 123)

Create a new test suite

This method is used to create a new test plan through API.

from qaseio.client.models import TestSuiteCreate

test_suite = qase.suites.create(
    "PRJCODE",
    TestSuiteCreate("New test suite"),
)

Update test suite

This method is used to update existing test suite through API.

from qaseio.client.models import TestSuiteUpdate

test_suite = qase.suites.update(
    "PRJCODE",
    123,
    TestSuiteUpdate("Updated suite"),
)

Delete test suite

This method completely deletes a test suite from repository.

qase.suites.delete("PRJCODE", 123)

Milestones

Get all milestones

This method allows to retrieve all milestones stored in selected project. You can you limit and offset params to paginate.

from qaseio.client.models import MilestoneFilters

milestones = qase.milestones.get_all(
    "PRJCODE", filters=MilestoneFilters(search="query")
)

Get a specific milestone

This method allows to retrieve a specific milestone.

milestone = qase.milestones.get("PRJCODE", 123)

Check milestone exists

exists = qase.milestones.exists("PRJCODE", 123)

Create a new milestone

This method is used to create a new test plan through API.

from qaseio.client.models import MilestoneCreate

milestone = qase.milestones.create(
    "PRJCODE",
    MilestoneCreate("New test suite"),
)

Update milestone

This method is used to update existing milestone through API.

from qaseio.client.models import MilestoneUpdate

test_suite = qase.milestones.update(
    "PRJCODE",
    123,
    MilestoneUpdate("Updated suite"),
)

Delete milestone

This method completely deletes a milestone from repository.

qase.milestones.delete("PRJCODE", 123)

Test plans

Get all test plans

This method allows to retrieve all test plans stored in selected project. You can you limit and offset params to paginate.

test_plans = qase.plans.get_all("PRJCODE")

Get a specific test plan

This method allows to retrieve a specific test plan.

test_plan = qase.plans.get("PRJCODE", 123)

Check test plan exists

exists = qase.plans.exists("PRJCODE", 123)

Create a new test plan

This method is used to create a new test plan through API.

from qaseio.client.models import TestPlanCreate

test_plan = qase.plans.create(
    "PRJCODE",
    TestPlanCreate("New test run", [1, 2, 3]),
)

Update test plan

This method is used to update existing test plan through API.

from qaseio.client.models import TestPlanCreate

test_plan = qase.plans.update(
    "PRJCODE",
    123,
    TestPlanCreate("New test run", [1, 2, 3]),
)

Delete test plan

This method completely deletes a test plan from repository.

qase.plans.delete("PRJCODE", 123)

Test runs

Get all test runs

This method allows to retrieve all test runs stored in selected project. You can you limit and offset params to paginate.

from qaseio.client.models import TestRunInclude
test_runs = qase.runs.get_all("PRJCODE", include=TestRunInclude.CASES)

Get a specific test run

This method allows to retrieve a specific test run.

test_run = qase.runs.get("PRJCODE", 4)

Check test run exists

exists = qase.runs.exists("PRJCODE", 4)

Create a new test run

This method is used to create a new test run through API.

from qaseio.client.models import TestRunCreate

test_run = qase.runs.create(
    "PRJCODE",
    TestRunCreate("Test run", [1, 2, 3]),
)

Delete test run

This method completely deletes a test run from repository.

qase.runs.delete("PRJCODE", 4)

Test run results

Get all test run results

This method allows to retrieve all test run results stored in selected project. You can you limit and offset params to paginate.

test_run_results = qase.results.get_all("PRJCODE")

Get a specific test run result

This method allows to retrieve a specific test run result.

test_run_result = qase.results.get("PRJCODE", "2898ba7f3b4d857cec8bee4a852cdc85f8b33132")

Create a new test run result

This method is used to create a new test run result through API.

from qaseio.client.models import TestRunResultCreate, TestRunResultStatus

test_run_result = qase.results.create(
    "PRJCODE",
    4,
    TestRunResultCreate(123, TestRunResultStatus.PASSED),
)

Update test run result

This method is used to update existing test run result through API.

from qaseio.client.models import TestRunResultUpdate, TestRunResultStatus

test_run_result = qase.results.update(
    "PRJCODE",
    4,
    "2898ba7f3b4d857cec8bee4a852cdc85f8b33132",
    TestRunResultUpdate(TestRunResultStatus.PASSED),
)

Delete test run result

This method completely deletes a test run result from repository.

qase.results.delete("PRJCODE", 4, "2898ba7f3b4d857cec8bee4a852cdc85f8b33132")

Contribution

Install project locally:

python3 -m venv .venv
source .venv/bin/activate
python setup.py develop

Install dev requirements:

pip install pre-commit
pre-commit install

Test project:

tox

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qaseio-1.1.0b3.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

qaseio-1.1.0b3-py2.py3-none-any.whl (19.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file qaseio-1.1.0b3.tar.gz.

File metadata

  • Download URL: qaseio-1.1.0b3.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for qaseio-1.1.0b3.tar.gz
Algorithm Hash digest
SHA256 9ca99a5cab00fd6b444f94575e7e7063d79d820549c03d9274d475701d168610
MD5 4b348b7511e42edd428c856b3ac47a6b
BLAKE2b-256 7cffdda6a57ff2aa17eebbfed8bc900fe6cfe3f2dcce8182a4cfa49582e96c25

See more details on using hashes here.

File details

Details for the file qaseio-1.1.0b3-py2.py3-none-any.whl.

File metadata

  • Download URL: qaseio-1.1.0b3-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for qaseio-1.1.0b3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7d86a9a5c2fc57659b0e4a5b746b337c605cd29160287c59e053b8a5a2c46e66
MD5 2b84be4fa049604026258334701af8a4
BLAKE2b-256 9a65d12072db11ea60c6128b2ca5fd34010fa1422be14e39e12642f6c0fb5ccc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page