Skip to content

Latest commit

 

History

History
237 lines (194 loc) · 8.86 KB

README.md

File metadata and controls

237 lines (194 loc) · 8.86 KB

PROD status

Regression Testing UBUNTU Regression Testing WINDOWS CodeQL GitHub CodeFactor

Description

Utility to perform tests coverage analysis based on xlsx tables e.g scenarios, test cases or download of system states. This utility is applicable for documents with structure that correlate to the analysis mode.

To see more details please visit Wiki

How to install

$ git clone https://github.com/MostHappyCougar/QACoverageTool.git

Or just download packages from last release

Requirements

requirements.txt file is in code/cov_tool directory of this utility. Change current work directory to some/path/to/code/cov_tool then execute in terminal to install requirements:

$ pip install -r requirements.txt

or

$ pip install -r path/to/requirements.txt

from any work directory

Usage

Configuration

Befure utility use you should create and configure a config in /code/configurations/ directory. There is should be specified a list of analysis mods that will be performed at utility run. Also you can configure each analysis mod in details via mentioned config. There is possible to store several configs and use any count of them individually or together

Config Example

This config is prepared for EXAMPLE.xlsx and 1_2_1_TEST.xlsx stored in code/tables_to_analisys/

##############################################
#ANALYSIS MODS THAT WILL BE APPLIED FOR TESTS#
#                                            #
#Applicable mods:                            #
# - state-transitions                        #
# - parameters-traceability                  #
##############################################
analysis-mods:
   - state-transition
   - parameters-traceability


#########################################
#DETAIL CONFIGURATIONS FOR ANALYSIS MODS#
#########################################

#State-transitions diagram
state-transition:
   #All generated files will be saved here.
   output_directory: EXAMPLE
   file_names: EX_TEST
   #Table and sheet where data to analysis will be take from
   input_directory: tables_to_analisys
   input_table: EXAMPLE.xlsx
   input_sheet: test

   #States and transitions will be assigned to object based on these table columns.
   #When values from objects columns is same for several states/transitions then these states/transitions will be related to this object
   #You may mention here a several columns. So each unique compination of values of mentioned columns will be considered as one unique object
   objects:
      - TestCase

   #Sequence of transitions and states will be considered based on this field
   sequences:
      - StepID

   #Transitions will be took from these fields
   #You may mention here a several columns. Each unique combination of values of mentioned columns will be considered as one transition
   transitions:
      - Action

   #States will be took from these fields
   #You may mention here a several columns. Each unique combination of values from mentioned columns will be considered as one state
   states:
      - CountToPlace
      - CountToCancel

parameters-traceability:
   #All generated files will be saved here.
   output_directory: EXAMPLE
   file_names: EX_TEST
   #Table and sheet where data to analysis will be take from
   input_directory: tables_to_analisys
   input_table: TEST/1_2_1_TEST.xlsx
   input_sheet: Cases

   index:
      - Sequencer
      - Object

   columns:
      - Transitions
      - States

Running

To use this utility you should run cov_tool that placed in /code/ directory of this utility with config name as an argument (without file extension). There may be several configs listed. All configs enumerated in arguments at cov_tool starts will be parsed and applied for tests coverage analysis. When no configs listed as agruments then conf_default.yaml will be applied. This config is valid preconfigured for example files. To chose analysis mods that will be aplied for tests you should enumerate them in analysis-mods section of .yaml config.

Example:

$ python cov_tool conf_default

Analysis mods

  1. state-transition - state-transitions diagram

    analysis-mods:
       - state-transition
    Usage Example - state-transition

    Preconditions:

    • Configuration:

      Config file for this usage case is: code/configurations/conf_default.yaml

    • Input table for analysis - there is should be no merged cells:

      Table to analysis

      image

    Analysis results:

    • There is following files as result of analysis in code/output/EXAMPLE:

      EX_TEST.gv - dot-language file for state-transitions diagram
       strict digraph "D:\Dev_Workspace\Eclipse\QACoverageTool\code\python\output\EXAMPLE\test" {
       	graph [concentrate=true imagescale=true]
       	START [label=START fillcolor=red fontcolor=white style=filled]
       	END [label=END fillcolor=red fontcolor=white style=filled]
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 2" [label=cancel]
       	"0, 2" -> "3, 0" [label=place]
       	"3, 0" -> END
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 1" [label=cancel]
       	"0, 1" -> "3, 0" [label=place]
       	"3, 0" -> END
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 4" [label=cancel]
       	"0, 4" -> "3, 0" [label=place]
       	"3, 0" -> END
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 2" [label=cancel]
       	"0, 2" -> "3, 0" [label=place]
       	"3, 0" -> END
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 4" [label=cancel]
       	"0, 4" -> "3, 0" [label=place]
       	"3, 0" -> END
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 3" [label=cancel]
       	"0, 3" -> "3, 0" [label=place]
       	"3, 0" -> END
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 3" [label=cancel]
       	"0, 3" -> "3, 0" [label=place]
       	"3, 0" -> END
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 4" [label=cancel]
       	"0, 4" -> "3, 0" [label=place]
       	"3, 0" -> END
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 1" [label=cancel]
       	"0, 1" -> "3, 0" [label=place]
       	"3, 0" -> END
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 3" [label=cancel]
       	"0, 3" -> "3, 0" [label=place]
       	"3, 0" -> END
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 2" [label=cancel]
       	"0, 2" -> "3, 0" [label=place]
       	"3, 0" -> END
       	START -> "3, 0" [label=place]
       	"3, 0" -> "0, 1" [label=cancel]
       	"0, 1" -> "3, 0" [label=place]
       	"3, 0" -> END
       }
      EX_TEST.gv.pdf - state-treansitions diagram in pdf format

      image

      EX_TEST_path_stats.xlsx - detail path information

      image

      EX_TEST_path_stats_vis.pdf - pie diagram that representate sequences of each path

      image

  2. parameters-traceability - parameters traceability matrix

    analysis-mods:
       - parameters-traceability
    Usage Example - parameters-traceability

    Preconditions:

    • Configuration:

      Config file for this usage case is: code/configurations/conf_default.yaml

    • Input table for analysis - there is should be no merged cells:

      Table to analysis

      image

    Analysis results:

    • There is following files as result of analysis in code/output/EXAMPLE:

      EX_TEST_param_trace.xlsx

      image