Skip to main content

parse test results to inform requirements

Project description

testreqstatus

PyPI - Version PyPI - Python Version


pip install testreqstatus

Usage

  1. Establish a set of requirements:

    {
      "romancal.regtest.test_mos_pipeline": {
        "test_level3_mos_pipeline": [
          "DMS356",
          "DMS374",
          "DMS400"
        ],
        "test_hlp_mosaic_pipeline": [
          "DMS373"
        ]
      }
    }
    

[!TIP] To extract test requirements from existing tests decorated with @metrics_logger, use extract_requirements_from_tests

  1. Run tests and generate a results.xml file:

    <?xml version="1.0" encoding="utf-8"?>
    <testsuites>
      <testsuite name="pytest" errors="0" failures="0" skipped="0" tests="2" time="2021.550" timestamp="2024-08-23T00:23:01.454354" hostname="spacetelescope-runner-2ls89-rrbf2">
        <testcase classname="romancal.regtest.test_mos_pipeline" name="test_level3_mos_pipeline" time="677.728">
        </testcase>
        <testcase classname="romancal.regtest.test_mos_pipeline" name="test_hlp_mosaic_pipeline" time="486.642">
        </testcase>
      </testsuite>
    </testsuites>
    
  2. Run requirements_status_from_test_results to retrieve requirements status from test results:

    requirements_status_from_test_results examples/test_requirements.json examples/results.xml
    
    {
      "DMS356": {
        "romancal.regtest.test_mos_pipeline": {
          "test_level3_mos_pipeline": "PASS"
        }
      },
      "DMS374": {
        "romancal.regtest.test_mos_pipeline": {
          "test_level3_mos_pipeline": "PASS"
        }
      },
      "DMS400": {
        "romancal.regtest.test_mos_pipeline": {
          "test_level3_mos_pipeline": "PASS"
        }
      },
      "DMS373": {
        "romancal.regtest.test_mos_pipeline": {
          "test_hlp_mosaic_pipeline": "PASS"
        }
      }
    }
    

[!TIP] Use --help to print usage information for any command.

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

testreqstatus-0.3.0.tar.gz (296.2 kB view details)

Uploaded Source

Built Distribution

testreqstatus-0.3.0-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for testreqstatus-0.3.0.tar.gz
Algorithm Hash digest
SHA256 40e5af79406cc018d5d8663fee7326f0b82ea33095a60f142fc794aac3b253e9
MD5 3655a864c6abb0146e67df028a2b06a8
BLAKE2b-256 cc6a9e4d23cd3c5457bd5f1aa5cdbf00582516e4354723e1d014f9ddf992c3fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for testreqstatus-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c536a8f48df1ffe6977d61d9f060234b1b112fd748e846c3b43c3e7f25ff09b0
MD5 efd33400f2cad01e57732f7ddb71b998
BLAKE2b-256 f070ea277c60329552ccd74c858f5d6d92de3eea9df2a22eaa65a4d3112e996a

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