Aggregate test results using the QualityForward Python library

QualityForward provides a cloud service for test management. We also provide a web API, but running the web API directly is tedious. So we are developing a library for Python (unofficial).

goofmint / qualityforward-py: QualityForward Python library

This time, I will explain the code that aggregates the test results on a daily basis using the Python library.

Loading and initializing the library

Initialize as follows.

from qualityforward.QualityForward import QualityForward
q = QualityForward("0aa...340") #API key

Acquisition and aggregation of test results

In order to get the test results, you need to drill down from the test phase to get the data.

#Get test phase
for test_phase in q.get_test_phases():
  #Get test suite assignments for each test phase
  for test_suite_assignment in test_phase.test_suite_assignments:
    #Get a test cycle
    for test_cycle in test_suite_assignment.get_cycles():
      #Get a test cycle
      test_cycle.get_results()

Let's output this aggregation result as follows.

for date in results:
    print(date)
    for result in results[date]:
        print(f'  {result}: {results[date][result]}')

Run

When executed, the output will be as follows.

$ python3 test.py
2019-08-16
  pass: 2
  fail: 1
2019-11-26
  pass: 4
  fail: 1
  skip: 1
  cut: 1
  block: 1
  qa: 1
2019-12-25
  pass: 3
  fail: 2
  skip: 1
  cut: 2
  block: 1
  na: 2
  qa: 2
2019-07-08
  pass: 38
  fail: 3
  block: 2
2019-07-09
  pass: 7
2019-08-15
  pass: 24
  fail: 1

You can sort by day, or use the argument to display only data for a specific range of dates.

Summary

The QualityForward Python library makes it easy to use the QualityForward web API from Python. It can be used in various ways, such as processing data on the cloud, linking it with your own system, and sending an email. Please, try it.

QualityForward

goofmint / qualityforward-py: QualityForward Python library

Recommended Posts

Aggregate test results using the QualityForward Python library
python setup.py test the code using multiprocess
Using the National Diet Library Search API in Python
I tried using the Python library from Ruby with PyCall
(Python3) No. oO (Are you using the standard library?): 5 shaders
AtCoder: Python: Daddy the sample test.
Tokenize using the Hugging Face library
[Python] Test sample using unittest2, mock
[Python] How to import the library
Extract the targz file using python
Try using the Python Cmd module
QualityForward Python library has been upgraded
Try using the Wunderlist API in Python
Try using the Kraken API in Python
Behind the flyer: Using Docker with Python
Installation method using the pip command of the Python package (library) Mac environment
Write the test in a python docstring
Install python library on Lambda using [/ tmp]
Tweet using the Twitter API in Python
Working with OpenStack using the Python SDK
What is "mahjong" in the Python library? ??
Reboot the router using Python, Selenium, PhantomJS
I tried using the Python library "pykakasi" that can convert kanji to romaji.
Feel free to turn Python using the library into an AWS Lambda function
[Hyperledger Iroha] Create an account using Python library
[Personal memo] julia --Using Python library with julia using PyCall
How to use the C library in Python
I checked the library for using the Gracenote API
vprof --I tried using the profiler for Python
Chord recognition using chromagram of python library librosa
[Python] Let's execute the module regularly using schedule
Try using the BitFlyer Ligntning API in Python
[Python] Test the moon matagi of relative delta
Python: Try using the UI on Pythonista 3 on iPad
Try using the Python web framework Tornado Part 1
Introduction of Python Imaging Library (PIL) using HomeBrew
Checking methods and variables using the library see
Python unit test library Nose option introduction-19 types-
Manage AWS nicely with the Python library Boto
Use the Python framework "cocotb" to test Verilog.
I tried using the Datetime module by Python
Pre-process the index in Python using Solr's ScriptUpdateProcessor
A memorandum about the Python tesseract wrapper library
Operate the schedule app using python from iphone
Sound the buzzer using python on Raspberry Pi 3!
The 3rd Algorithm Practical Test (PAST) Explanation (Python)
Try using the collections module (ChainMap) of python3
Using the 3D plot library MayaVi from Julia
Find the geometric mean of n! Using Python
Try using the Python web framework Tornado Part 2
Use the LibreOffice app in Python (3) Add library
[Modint] Decoding the AtCoder Library ~ Implementation in Python ~
I tried using the functional programming library toolz
Try using the DropBox Core API in Python
Run the Blue Prism process using Python (SOAP)
Python 3.6 email library
Python ast library
About the test
A note on the library implementation that explores hyperparameters using Bayesian optimization in Python
Start using Python
How to unit test a function containing the current time using freezegun in python