Beispiel #1
0
        //**********************************************************************
        /// <summary>
        /// Load the rxtst file, and get the runlist of testcase name
        /// </summary>
        public ArrayList getRunlist()
        {
            ArrayList runlist = new ArrayList();

            string xmlpath = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(),
                                                    "NformTester.rxtst");
            XmlDocument xmldoc = new XmlDocument();

            xmldoc.Load(xmlpath);
            XmlNodeList nodes;
            XmlElement  xe;

            Hashtable htAllCaseName = new Hashtable();

            nodes = xmldoc.SelectNodes("/testsuite/content/testcase");
            int iNum = 0;

            int abcddd = nodes.Count;

            foreach (XmlNode xnf in nodes)
            {
                generateRunningList(xnf, htAllCaseName, ref iNum);
            }


            int abc = htAllCaseName.Count;

            nodes = xmldoc.SelectNodes("/testsuite/testconfigurations/testconfiguration/testcase");
            for (int i = 0; i < nodes.Count; i++)
            {
                xe = (XmlElement)nodes[i];
                object[] arg = (object[])htAllCaseName[xe.GetAttribute("id")];
                if (arg == null)
                {
                    continue;
                }
                runlist.Add(arg);
            }

            IComparer myComparer = new myRunlistCompareClass();

            runlist.Sort(myComparer);

//          MessageBox.Show(runlist.Count.ToString());
//
//          for(int testNum = 0; testNum < runlist.Count; testNum++)
//          {
//              object[] arg = (object[])runlist[testNum];
//              MessageBox.Show((string)arg[0] +"      "+arg[1].ToString());
//          }

            return(runlist);
        }
Beispiel #2
0
        //**********************************************************************
        /// <summary>
        /// Load the rxtst file, and get the runlist of testcase name
        /// </summary>
        public ArrayList getRunlist()
        {
            ArrayList runlist = new ArrayList();

            string xmlpath = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(),
                                                    "NformTester.rxtst");
            XmlDocument xmldoc = new XmlDocument();

            xmldoc.Load(xmlpath);
            XmlNodeList nodes;
            XmlElement  xe;

            Hashtable htAllCaseName = new Hashtable();

            nodes = xmldoc.SelectNodes("/testsuite/content/testcase");
            int iNum = 0;

            foreach (XmlNode xnf in nodes)
            {
                xe = (XmlElement)xnf;
                htAllCaseName.Add(xe.GetAttribute("id"),
                                  new object[] { xe.GetAttribute("name"), iNum });
                iNum++;
            }

            nodes = xmldoc.SelectNodes("/testsuite/testconfigurations/testconfiguration/testcase");
            for (int i = 0; i < nodes.Count; i++)
            {
                xe = (XmlElement)nodes[i];
                object[] arg = (object[])htAllCaseName[xe.GetAttribute("id")];
                if (arg == null)
                {
                    continue;
                }
                runlist.Add(arg);
            }

            IComparer myComparer = new myRunlistCompareClass();

            runlist.Sort(myComparer);
            return(runlist);
        }
Beispiel #3
0
        //**********************************************************************
        /// <summary>
        /// Load the rxtst file, and get the runlist of testcase name
        /// </summary>
        public ArrayList getRunlist()
        {
            ArrayList runlist = new ArrayList();

            string xmlpath = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(),
                                                 "NformTester.rxtst");
            XmlDocument xmldoc = new XmlDocument();
            xmldoc.Load(xmlpath);
            XmlNodeList nodes ;
            XmlElement xe;

            Hashtable htAllCaseName = new Hashtable();
            nodes = xmldoc.SelectNodes("/testsuite/content/testcase");
            int iNum = 0;
            foreach(XmlNode xnf in nodes)
            {
                xe=(XmlElement)xnf;
                htAllCaseName.Add(xe.GetAttribute("id"),
                                  new object[] {xe.GetAttribute("name"), iNum} );
                iNum ++;
            }

            nodes = xmldoc.SelectNodes("/testsuite/testconfigurations/testconfiguration/testcase");
            for(int i=0; i< nodes.Count; i++)
            {
                xe=(XmlElement)nodes[i];
                object[] arg = (object[])htAllCaseName[xe.GetAttribute("id")];
                if(arg == null)
                    continue;
                runlist.Add(arg);

            }

            IComparer myComparer = new myRunlistCompareClass();
            runlist.Sort(myComparer);
            return runlist;
        }
Beispiel #4
0
		/// <summary>
		/// Sashimi 
		/// Load the rxtst file, and get the runlist of testcase name
		/// </summary>
		/// <returns>runlist</returns>
		public ArrayList getRunlist()
		{
			ArrayList runlist = new ArrayList();
			
			string xmlpath = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(),
                                                 "NformTester.rxtst");
        	XmlDocument xmldoc = new XmlDocument();
        	xmldoc.Load(xmlpath);
        	XmlNodeList nodes ;
        	XmlElement xe;
        	
        	Hashtable htAllCaseName = new Hashtable();
			nodes = xmldoc.SelectNodes("/testsuite/content/folder");
//			nodes = xmldoc.SelectNodes("/testsuite/content/testcase");
        	int iNum = 0;  	
        	int stabcddd = nodes.Count;
        	foreach(XmlNode xnf in nodes)
        	{	
        		generateRunningList(xnf,htAllCaseName, ref iNum);        		        			
        	}
        	
        	int abc = htAllCaseName.Count;
        	
        	nodes = xmldoc.SelectNodes("/testsuite/testconfigurations/testconfiguration/testcase");
        	for(int i=0; i< nodes.Count; i++)
        	{
        		xe=(XmlElement)nodes[i];
        		object[] arg = (object[])htAllCaseName[xe.GetAttribute("id")];
        		if(arg == null)
        			continue;
        		runlist.Add(arg);
        		
        	}
        	        	
        	IComparer myComparer = new myRunlistCompareClass();
        	runlist.Sort(myComparer);
        	
//        	MessageBox.Show(runlist.Count.ToString());
//        	
//        	for(int testNum = 0; testNum < runlist.Count; testNum++)
//        	{
//        		object[] arg = (object[])runlist[testNum];
//        		MessageBox.Show((string)arg[0] +"      "+arg[1].ToString());
//        	}
        	
        	return runlist;

		}