Skip to main content

Test Automation framework for TestLodge

Project description

PyLodge

PyLodge is a framework that integrates the automated tests with TestLodge. It will update the status of the test cases in TestLodge based on the execution status of the automation script. In case of Failed test cases, it will create a defect in the issue tracker if the project in TestLodge has the issue tracker configured.

https://github.com/gettalent/pylodge

C

Installation:

To install pylodge, simply:

$ pip install pylodge

Usage:

If you are using the pytest framework, you need to add the following lines of code in the __init__.py file.

This will create a test run in TestLodge whenever your automated tests run:

from pylodge.pylodge import PyLodge
pylodge_obj = PyLodge(testlodge_username, testlodge_password, testlodge_project, testlodge_api_url)
pylodge_obj.create_test_run()
In the conftest.py, you need to write a hook that will read the execution status of your pytest and pass that status to

pylodge. Something like this:

@pytest.mark.tryfirst
def pytest_runtest_makereport( __multicall__):
    rep = __multicall__.execute()
    if rep.when == 'call':
        nodeid = rep.nodeid
        callerlist = nodeid.split("::")
        test_name= os.path.splitext(callerlist[0])[0]
        substring = re.search('test_(.*)', test_name)
        if substring:
            test_name = substring.group(1)
        if rep.passed:
            print 'Passed'
            pylodge_obj.mark_test_as_passed(test_name)
        elif rep.failed:
            print 'Failed'
            pylodge_obj.mark_test_as_failed(test_name)
        elif rep.skipped:
            print 'Skipped'
            pylodge_obj.mark_test_as_skipped(test_name)
    return rep

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

pylodge-0.1.9.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file pylodge-0.1.9.tar.gz.

File metadata

  • Download URL: pylodge-0.1.9.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pylodge-0.1.9.tar.gz
Algorithm Hash digest
SHA256 8fded2e3dab7cf9327e4ca1d788caf4ea670be0d8afd352d1c7c5fa25c4ae562
MD5 8fd171f5e43dd5158bec59b7ebb2fdb8
BLAKE2b-256 37c7763df092e5766cc84777a171c718f7a913808ec3cc22942285233a067f59

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