Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #50067

need data structure to for test results analysis

Newsgroups comp.lang.python
Date 2013-07-06 07:58 -0700
Message-ID <9ee9bed7-591a-4a3c-8cf6-9b1fc3b51cad@googlegroups.com> (permalink)
Subject need data structure to for test results analysis
From terry433iid@googlemail.com

Show all headers | View raw


I have a python program that reads test result information from SQL and creates the following data that I want to capture in a data structure so it can be prioritized appropriately :-

test_name     new fail                                       P1
test_name     known fail (but no bug logged)                 P2
test_name     known fail (bug logged but is closed)          P3
test_name     known fail (bug is open)                       P4




If I run my script I will get  one of these types of failures - PLUS the number of occurrences of each type, sample data as follows:-
 P1 new fail   | occurrence once (obviously)
 P1 new fail   | occurrence once (obviously)
 P1 new fail   | occurrence once (obviously)
 P1 new fail   | occurrence once (obviously)
 P2 known fail | occurred previously 10 times in earlier executions
 P2 known fail | occurred previously 15 times in earlier executions
 P2 known fail | occurred previously 16 times in earlier executions
 P2 known fail | occurred previously 5 times in earlier executions
 P3 known fail | occurred previously 6 times in earlier executions
 P4 known fail | occurred previously 1 times in earlier executions
 P4 known fail | occurred previously 12 times in earlier executions
.
.
.
etc 



I want to be store this in an appropriate structure so I can then so some analysis :-
  if (all reported fails are "new fail"):
      this is priority 1
  if (some fails are "new fail" and some are known (P2/P3/P4):
      this is priority 2
  if (no new fail, but all/some reported fails are "P2 known fail")
      this is priority 3
  if ( all/some reported fails are "P3 known fail")
      this is priority 4
  if ( all/some reported fails are "P4 known fail")
      this is priority 4

I have tried using dictionary/lists but can't get the exact final outcome I want, any help appreciated....

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

need data structure to for test results analysis terry433iid@googlemail.com - 2013-07-06 07:58 -0700
  Re: need data structure to for test results analysis Joshua Landau <joshua.landau.ws@gmail.com> - 2013-07-07 02:50 +0100

csiph-web