Skip to main content

Pytest adaptor for TestLite TMS system

Project description

PyPI version Python versions

Pytest adaptor for TestLite TMS system


This pytest plugin was generated with Cookiecutter along with @hackebrot’s cookiecutter-pytest-plugin template.

Installation

You can install “pytest-TestLitePytest” via pip from PyPI:

$ pip install TestLitePytest

Initial setup

To use, create a config file: “TestLiteConfig.ini” (be sure to use this name, otherwise you will not find the configuration file)

[TestLiteConfig]
TESTLITEURL=http://TestLite.test (The address where your TestLite is located)
DELETEREPORTSDIR=True/False (Save folder with reports) (Default: True)
REPORTSDIRNAME=TestLiteReports (Тame of the folder with reports)
REPORTSSAVETYPE=BINARY/TXT (In what format to save reports) (Default: BINARY) (TXT doesn't work))

Use in your tests

import  testlite

class  TestWithTestLite:

    @testlite.test_key('PROJECT-TC-1')
    def  test_1(self):
        pass

    @testlite.test_key('PROJECT-TC-2')
    def  test_2(self):
    pass

Where “PROJECT-TC-1” its test case key in TestLite

@testlite.test_key('PROJECT-TC-1')
    #TestLiteStep
    ..step1
    #TestLiteStep
    ..step2

#TestLiteStep - This is a pointer to the start of the step. The next #TestLiteStep indicates that the step has ended and a new one has begun. If an error is caused between these comments, the report will show that the step was broken

get_parameters_from_TestLite('PROJECT-TC-1')

Returns parameters that are specified in test cases in TestLite

What it should look like

import testlite
import pytest

params = get_parameters_from_TestLite('PROJECT-TC-1')

class Test:

    @pytest.fixture
    def fixture(self):
        return 'fixture value'

    @testlite.test_key('PROJECT-TC-1')
    @pytest.mark.parametrize('data', params)
    def test_1(self, fixture, data):
        #TestLiteStep
        ..step1
        #TestLiteStep
        ..step2

Command Line Arguments

  1. –testsuite=PROJECT-TS-1 (TestSuite key in TestLite)

  2. –savejson=json_report.json (If so, save the file with the report.)

  3. –collectfromtestlite (If specified, it will try to collect test cases using the keys specified in the test functions that correspond to the test suite in TestLite)

If you specify testsuite then TestLitePytest will try to send a report to your TestLite that you specified

License

Distributed under the terms of the MIT license, “TestLitePytest” is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

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

testlitepytest-0.3.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

TestLitePytest-0.3.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file testlitepytest-0.3.0.tar.gz.

File metadata

  • Download URL: testlitepytest-0.3.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.5

File hashes

Hashes for testlitepytest-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d1f542a4fcad6529644e7a7949b2bebd6173eb55f72251740e32479638adea45
MD5 249dda0e674834681f4dc9b23fe3cc3d
BLAKE2b-256 06c501e1e639ce3d724a9bd4d15591504f6b36c4e6578777eec38e085cdaf936

See more details on using hashes here.

File details

Details for the file TestLitePytest-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: TestLitePytest-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.5

File hashes

Hashes for TestLitePytest-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86d915f822e852a452cedca83e9efe4eb23a551777d2d64cd8d19b3634f05fe3
MD5 fb99e6ca1fc15806f7bd0a02099f413e
BLAKE2b-256 06d035ad017b9fd83ed75c2525eb8fdef08e9302501c62a9d006da3c833832ce

See more details on using hashes here.

Supported by

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