From 099d06f1138f2c11f5f7760257d5b87e25df87b0 Mon Sep 17 00:00:00 2001 From: itraviv Date: Sun, 30 Oct 2016 16:06:26 +0200 Subject: Added goldenMin and GoldenMax metrics for Google Analytics regression testing report Signed-off-by: itraviv --- .../trex_control_plane/stl/trex_stl_lib/utils/GAObjClass.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts/automation') diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/GAObjClass.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/GAObjClass.py index 1699ab88..ece4cf10 100755 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/GAObjClass.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/GAObjClass.py @@ -85,13 +85,15 @@ class GA_EXCEPTION_ObjClass(GA_ObjClass): #..................................................................class GA_TESTING_ObjClass................................................................ class GA_TESTING_ObjClass(GA_ObjClass): - def __init__(self,cid,trackerID,TRexMode,TestName,SetupName,appName,appVer,TestType,Mppspc): + def __init__(self,cid,trackerID,TRexMode,TestName,SetupName,appName,appVer,TestType,Mppspc,GoldenMin,GoldenMax): GA_ObjClass.__init__(self,cid,trackerID,appName,appVer) self.TRexMode = TRexMode self.TestName = TestName self.SetupName = SetupName self.TestType = TestType self.Mppspc = Mppspc + self.GoldenMin = GoldenMin + self.GoldenMax = GoldenMax self.payload = self.generate_payload() self.size = sys.getsizeof(self.payload) @@ -103,6 +105,8 @@ class GA_TESTING_ObjClass(GA_ObjClass): self.payload+='&cd3='+str(self.SetupName) self.payload+='&cd4='+str(self.TestType) self.payload+='&cm1='+str(self.Mppspc) + self.payload+='&cm2='+str(self.GoldenMin) + self.payload+='&cm3='+str(self.GoldenMax) return self.payload #.....................................................................class ga_Thread................................................................. """ @@ -279,8 +283,8 @@ class GAmanager_Regression(GAmanager): self.GoogleID = GoogleID self.AnalyticsUserID = AnalyticsUserID - def gaAddTestQuery(self,TestName,TRexMode,SetupName,TestType,Mppspc): - self.gaAddObject(GA_TESTING_ObjClass(self.AnalyticsUserID,self.GoogleID,TRexMode,TestName,SetupName,self.appName,self.appVer,TestType,Mppspc)) + def gaAddTestQuery(self,TestName,TRexMode,SetupName,TestType,Mppspc,GoldenMin,GoldenMax): + self.gaAddObject(GA_TESTING_ObjClass(self.AnalyticsUserID,self.GoogleID,TRexMode,TestName,SetupName,self.appName,self.appVer,TestType,Mppspc,GoldenMin,GoldenMax)) -- cgit 1.2.3-korg