コード例 #1
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetExcelReport(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) FROM [td].[ANALYSIS_ITEMS] where AI_OWNER <> 'N/A' and  AI_TYPE = 'ExcelReport' and cast(AI_VTS as date) BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var recValues = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = 0;
            return(recValues);
        }
コード例 #2
0
        public RecordValues GetTestInstanceLinked(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) from td.TESTCYCL where TC_ASSIGN_RCYC in (select RCYC_ID from td.RELEASES inner join td.RELEASE_CYCLES on REL_ID = RCYC_PARENT_ID where REL_NAME = '{Cycle}') and TC_STATUS in ('Failed', 'Blocked')");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select count(distinct(LN_ENTITY_ID)) from td.LINK where LN_ENTITY_TYPE in ('TESTCYCL') and LN_ENTITY_ID IN (select TC_TESTCYCL_ID from td.TESTCYCL where TC_ASSIGN_RCYC in (select RCYC_ID from td.RELEASES inner join td.RELEASE_CYCLES on REL_ID = RCYC_PARENT_ID where REL_NAME = '{Cycle}') and TC_STATUS in ('Failed', 'Blocked'))");
            var criticalRec = Convert.ToInt32(dta.Rows[0][0]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #3
0
        public RecordValues GetTestSetNotCompleted(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(distinct(RN_TESTCYCL_ID)) from td.RUN where RN_ASSIGN_RCYC in (select RCYC_ID from td.RELEASES inner join td.RELEASE_CYCLES on REL_ID = RCYC_PARENT_ID where REL_NAME = '{Cycle}') group by RN_TESTCYCL_ID");
            var sampleRec = dts.Rows.Count;
            var dta       = projectDb.SqlQuery(
                $"select RN_TESTCYCL_ID, count(RN_TESTCYCL_ID) from td.RUN where RN_STATUS = 'Not Completed' and RN_ASSIGN_RCYC in (select RCYC_ID from td.RELEASES inner join td.RELEASE_CYCLES on REL_ID = RCYC_PARENT_ID where REL_NAME = '{Cycle}') group by RN_TESTCYCL_ID having count(RN_TESTCYCL_ID) > 1");
            var criticalRec = dta.Rows.Count;
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = sampleRec - criticalRec;
            return(recValues);
        }
コード例 #4
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetTestReqLinked(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) as RecCount from td.Test where TS_CREATION_DATE BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0]["RecCount"]);
            var dta       = projectDb.SqlQuery(
                $"select count(*) as RecCount from td.REQ_COVER where RC_ENTITY_TYPE = 'TEST' and RC_ENTITY_ID in (select TS_TEST_ID from td.TEST where TS_CREATION_DATE BETWEEN '{StartDate}' and '{EndDate}')");
            var criticalRec = Convert.ToInt32(dta.Rows[0]["RecCount"]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #5
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetTestDuplicate(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) as RecCount from td.Test where TS_CREATION_DATE BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0]["RecCount"]);
            var dta       = projectDb.SqlQuery(
                $"select TS_NAME from td.TEST where TS_NAME in (select distinct(TS_NAME) from td.TEST where TS_CREATION_DATE BETWEEN '{StartDate}' and '{EndDate}') group by TS_NAME having count(ts_name) > 1");
            var criticalRec = Convert.ToInt32(dta.Rows.Count);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = sampleRec - criticalRec;
            return(recValues);
        }
コード例 #6
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetTestSteps(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) as RecCount from td.Test where TS_CREATION_DATE BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0]["RecCount"]);
            var dta       = projectDb.SqlQuery(
                $"select t2.TS_TEST_ID, count(t1.DS_ID) from td.DESSTEPS t1 inner join td.TEST t2 on t1.DS_TEST_ID = t2.TS_TEST_ID where t2.TS_CREATION_DATE BETWEEN '{StartDate}' and '{EndDate}' group by t2.TS_TEST_ID having count(t1.DS_ID) > 1");
            var criticalRec = Convert.ToInt32(dta.Rows.Count);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #7
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetReqCoverage(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) from td.REQ where RQ_TYPE_ID IN (select TPR_TYPE_ID from td.REQ_TYPE where TPR_NAME in('Functional','Testing','Undefined','Performance','Story','Feature','Quality','Compliance','Security','System')) and RQ_REQ_DATE BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select count(distinct(t1.RC_REQ_ID)) from [td].[REQ_COVER] t1 inner join td.REQ t2 on t2.RQ_REQ_ID = t1.RC_REQ_ID where t2.RQ_REQ_ID in (select RQ_REQ_ID from td.REQ where RQ_TYPE_ID IN (select TPR_TYPE_ID from td.REQ_TYPE where TPR_NAME in('Functional','Testing','Undefined','Performance','Story','Feature','Quality','Compliance','Security','System')) and RQ_REQ_DATE BETWEEN '{StartDate}' and '{EndDate}')");
            var criticalRec = Convert.ToInt32(dta.Rows[0][0]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #8
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetTestSetNotCompleted(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(distinct(RN_TESTCYCL_ID)) from td.RUN where RN_EXECUTION_DATE BETWEEN '{StartDate}' and '{EndDate}' group by RN_TESTCYCL_ID");
            var sampleRec = dts.Rows.Count;
            var dta       = projectDb.SqlQuery(
                $"select RN_TESTCYCL_ID, count(RN_TESTCYCL_ID) from td.RUN where RN_STATUS = 'Not Completed' and RN_EXECUTION_DATE BETWEEN '{StartDate}' and '{EndDate}' group by RN_TESTCYCL_ID having count(RN_TESTCYCL_ID) > 1");
            var criticalRec = dta.Rows.Count;
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = sampleRec - criticalRec;
            return(recValues);
        }
コード例 #9
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetTestInstanceLinked(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) from td.TESTCYCL where TC_EXEC_DATE BETWEEN '{StartDate}' and '{EndDate}' and TC_STATUS in ('Failed', 'Blocked')");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select count(distinct(LN_ENTITY_ID)) from td.LINK where LN_ENTITY_TYPE in ('TESTCYCL') and LN_ENTITY_ID IN (select TC_TESTCYCL_ID from td.TESTCYCL where TC_EXEC_DATE BETWEEN '{StartDate}' and '{EndDate}' and TC_STATUS in ('Failed', 'Blocked'))");
            var criticalRec = Convert.ToInt32(dta.Rows[0][0]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #10
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetDefectPtr(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(bg_bug_id) from td.bug where BG_USER_TEMPLATE_29 = 'PTR' and cast(BG_VTS as date) BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select count(distinct(LN_BUG_ID)) from td.LINK where LN_ENTITY_TYPE in ('TESTCYCL') and LN_BUG_ID IN (select BG_BUG_ID from td.BUG where BG_USER_TEMPLATE_29 = 'PTR' and cast(BG_VTS as date) BETWEEN '{StartDate}' and '{EndDate}')");
            var criticalRec = Convert.ToInt32(dta.Rows[0][0]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #11
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetTestSetCycle(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) from td.CYCLE where cast(CY_VTS as date) BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select count(*) from td.CYCLE where CY_ASSIGN_RCYC IS NOT NULL and  cast(CY_VTS as date) BETWEEN '{StartDate}' and '{EndDate}'");
            var criticalRec = Convert.ToInt32(dta.Rows[0][0]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #12
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetDefectSWAId(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) from td.BUG where BG_DETECTION_DATE BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select count(bg_bug_id) from td.bug where BG_USER_TEMPLATE_26 is NOT NULL and BG_DETECTION_DATE BETWEEN '{StartDate}' and '{EndDate}'");
            var criticalRec = Convert.ToInt32(dta.Rows[0][0]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #13
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetDefectInstanceLink(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) from td.BUG where BG_DETECTION_DATE BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select count(distinct(LN_BUG_ID)) from td.LINK where LN_BUG_ID IN (select BG_BUG_ID from td.BUG where BG_DETECTION_DATE BETWEEN '{StartDate}' and '{EndDate}')");
            var criticalRec = Convert.ToInt32(dta.Rows[0][0]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #14
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetReqCycle(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) from td.REQ where RQ_TYPE_ID IN (select TPR_TYPE_ID from td.REQ_TYPE where TPR_NAME in('Functional','Testing','Undefined','Performance','Story','Feature','Quality','Compliance','Security','System')) and RQ_REQ_DATE BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select count(*) from td.REQ where RQ_TARGET_RCYC_VARCHAR IS NOT NULL and RQ_TYPE_ID IN (select TPR_TYPE_ID from td.REQ_TYPE where TPR_NAME in('Functional','Testing','Undefined','Performance','Story','Feature','Quality','Compliance','Security','System')) and RQ_REQ_DATE BETWEEN '{StartDate}' and '{EndDate}'");
            var criticalRec = Convert.ToInt32(dta.Rows[0][0]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #15
0
        public RecordValues GetRunFastRun(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) from td.RUN where RN_ASSIGN_RCYC in (select RCYC_ID from td.RELEASES inner join td.RELEASE_CYCLES on REL_ID = RCYC_PARENT_ID where REL_NAME = '{Cycle}')");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select count(*) from td.RUN where RN_RUN_NAME not like 'Fast_Run%' and RN_ASSIGN_RCYC in (select RCYC_ID from td.RELEASES inner join td.RELEASE_CYCLES on REL_ID = RCYC_PARENT_ID where REL_NAME = '{Cycle}')");
            var criticalRec = Convert.ToInt32(dta.Rows[0][0]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #16
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetRunFastRun(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) from td.RUN where RN_EXECUTION_DATE BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select count(*) from td.RUN where RN_RUN_NAME not like 'Fast_Run%' and RN_EXECUTION_DATE BETWEEN '{StartDate}' and '{EndDate}'");
            var criticalRec = Convert.ToInt32(dta.Rows[0][0]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #17
0
        public RecordValues GetTestInstancePtr(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(TC_USER_TEMPLATE_72) from td.TESTCYCL where TC_USER_TEMPLATE_72 like '%1[0-9][0-9][0-9][0-9][0-9][0-9][0-9]' and TC_ASSIGN_RCYC in (select RCYC_ID from td.RELEASES inner join td.RELEASE_CYCLES on REL_ID = RCYC_PARENT_ID where REL_NAME = '{Cycle}')");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select TC_USER_TEMPLATE_72 as PTR, TC_TEST_ID, TS_NAME from td.TESTCYCL inner join td.TEST on td.TESTCYCL.TC_TEST_ID = td.TEST.TS_TEST_ID where TC_USER_TEMPLATE_72 like '%1[0-9][0-9][0-9][0-9][0-9][0-9][0-9]' and TC_ASSIGN_RCYC in (select RCYC_ID from td.RELEASES inner join td.RELEASE_CYCLES on REL_ID = RCYC_PARENT_ID where REL_NAME = '{Cycle}') and TC_TESTCYCL_ID IN (select LN_ENTITY_ID from td.LINK where LN_ENTITY_TYPE = 'TESTCYCL')");
            var criticalRec = Convert.ToInt32(dta.Rows.Count);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }
コード例 #18
0
ファイル: AuditMetrics.cs プロジェクト: nkthota/swametrics
        public RecordValues GetAssociatedCycles(string project)
        {
            var projectDb = new Database("td", "tdtdtd", "WPSQLQLC01", GetProjectDbName(project));
            var dts       = projectDb.SqlQuery(
                $"select count(*) from td.RELEASE_CYCLES where cast(RCYC_VTS as date) BETWEEN '{StartDate}' and '{EndDate}'");
            var sampleRec = Convert.ToInt32(dts.Rows[0][0]);
            var dta       = projectDb.SqlQuery(
                $"select count(distinct(t1.CY_ASSIGN_RCYC)) from td.CYCLE t1 inner join td.RELEASE_CYCLES t2 on t1.CY_ASSIGN_RCYC = t2.RCYC_ID where cast(RCYC_VTS as date) BETWEEN '{StartDate}' and '{EndDate}'");
            var criticalRec = Convert.ToInt32(dta.Rows[0][0]);
            var recValues   = new RecordValues();

            recValues.SampleSize   = sampleRec;
            recValues.CriteriaSize = criticalRec;
            return(recValues);
        }