Skip to main content

Provide insights on the outcomes of software test cases.

Project description

testyoke

Provide insights on the outcomes of software test cases for any programming language.

This project will provide resources to log the results of your test suites and aims to add useful insights to your testing. Tests are seen as gold, but how do you prune invalid, ineffective, or plain inaccurate test cases? With TestYoke you can:

  • See the results of tests on this git sha previously. Big time savings here, by not running again.
  • Flaky Tests - have both passed and failed on the present sha. There probably is a data or service dependency issue.
  • Bad Tests - tests that have been failing across consecutive shas.
    If these have been deployed anyways, these tests are worthless.  Prompt user to delete because they are costing the staff more than a good test is worth.
  • Regressions - tests that failed, were fixed, and fail again in different shas.  Regressions are recurring issues. They may prompt priority to fix.

The HTTP service in this project can run in the background and receive results of your test running, however you run them.

The service presently accepts junit xml, and there is a good chance your testing framework can export that format. Try setting up posting the results of your tests after every run of the suite via your build process.

install

pip install testyoke

getting started

You will need a server to report metrics to. See "Run the Service."

testyoke wrapper

A test suite wrapper is in progress. It presently supports pytest only.

testyoke pytest

many frameworks

The testyoke wrapper supports many testing frameworks. You may manually specify the framework you're using by supplying the FRAMEWORK environment variable.

FRAMEWORK=rspec testyoke rspec

Run the Service Yourself

  1. Run the service. Default port is 7357, but you may set it with the YOKE_PORT env var.
python3 -m testyoke.server YOKE_PORT=7357
  1. Everytime you run a test, POST the results using the client.
  python -m testyoke.client --sha=`git rev-parse HEAD` --report=junit.xml

junit.xml is presently the de facto format, as it is one of the more prevalent formats in the space. It is supported by pytest, scalatest, and obviously in java frameworks as well. This is the first format to be supported, but more formats are expected to be supported soon.

You can submit via curl/HTTP Post via the client, or by curls (Run this after your tests run):

  curl -H "vc-sha: $(SHA)" -H "Content-Type: application/xml+junit" -X POST -d @target/path/to/JUNIT.xml http://localhost:7357/projects/testharness/reports

Get reports by:

  curl http://localhost:7357/projects/testharness/shas/$(GIT_SHA)

Analytics

Run this before your tests run.

This will provide you with historical information. If the SHA has previously been proven, it will be reported it as clean.

  python -m testyoke.client --sha=`git rev-parse HEAD`

Example output:

###################################################
#
# nature: untested.  fails 0, passes 0
#
###################################################

Nature

This is a classification of the SHA you are running on.

  • untested - testyoke hasn't seen results from this SHA yet
  • clean - testyoke has never seen a failure on this SHA
  • broken - this SHA has never passed completely.
  • flaky - there is at least one flaky test, defined as having passed and failed on the same SHA.

Components

  • HTTP service
  • reporters
    • scalatest
    • pytest
    • rspec
  • cli client
  • analytics
  • web portal

Arch

API -> persist analyzers

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

testyoke-0.2.4.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

testyoke-0.2.4-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file testyoke-0.2.4.tar.gz.

File metadata

  • Download URL: testyoke-0.2.4.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.1

File hashes

Hashes for testyoke-0.2.4.tar.gz
Algorithm Hash digest
SHA256 7e64bf34055772171343bae54d3c46645e6d7a604c66560fee5f1ef15e4b37de
MD5 eafb59b09a9666ac871bd7f32275c479
BLAKE2b-256 1aa0a34e80a5f2095a4a13d09c3ef66c46904690e03db5c47f88efb0218c0cc9

See more details on using hashes here.

File details

Details for the file testyoke-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: testyoke-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.1

File hashes

Hashes for testyoke-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8e44630d2a3e8acdbb744424a4f31f1027696946b1a41752f8870a0b2c586d3e
MD5 692a05af16d9ae19eae59ada7be194dc
BLAKE2b-256 58e359914dedc9849dc92db63da2884a84a31b150373870bd6e1bf8a09a1e1f5

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