示例#1
0
        public Hashtable GetCoverageList(string foldername)
        {
            Hashtable ht = new Hashtable();

            FileUtils fileutil = new FileUtils();

            fileutil.SetHowDeepToScan(2);
            fileutil.ProcessDir(foldername, 1, true, "_", ".xml", null);
            List <String> fileNames = fileutil.GetFileNames();

            for (int i = 0; i < fileNames.Count; i++)
            {
                ReportAnalyzor ra           = new ReportAnalyzor();
                string[]       method_ratio = ra.ExtractCoverageInfo(fileNames[i]);
                ht.Add(method_ratio[0], (float)System.Convert.ToSingle(method_ratio[1]));
                Console.WriteLine(i + "/" + fileNames.Count + "     MethodName: " + method_ratio[0] + "  BlockCoverage: " + (float)System.Convert.ToSingle(method_ratio[1]));
            }
            fileutil.CleanFileNames();
            return(ht);
        }
示例#2
0
        public Hashtable GetCoverageList(string foldername)
        {
            Hashtable ht = new Hashtable();

            FileUtils fileutil = new FileUtils();
            fileutil.SetHowDeepToScan(2);
            fileutil.ProcessDir(foldername, 1, true, "_", ".xml", null);
            List<String> fileNames = fileutil.GetFileNames();

            for (int i = 0; i < fileNames.Count; i++)
            {
                ReportAnalyzor ra = new ReportAnalyzor();
                string[] method_ratio = ra.ExtractCoverageInfo(fileNames[i]);
                ht.Add(method_ratio[0], (float)System.Convert.ToSingle(method_ratio[1]));
                Console.WriteLine(i + "/" + fileNames.Count + "     MethodName: " + method_ratio[0] + "  BlockCoverage: " + (float)System.Convert.ToSingle(method_ratio[1]));
            }
            fileutil.CleanFileNames();
            return ht;
        }