void Build (TestSuite suite) { // if (Environment.GetEnvironmentVariables().Contains("START_DEBUG")) // System.Diagnostics.Debugger.Launch (); ReadLists (); XmlDocument whole = new XmlDocument (); whole.Load (@"testsuite/TESTS/catalog-fixed.xml"); foreach (XmlElement testCase in whole.SelectNodes ("test-suite/test-catalog/test-case")) { string testid = testCase.GetAttribute ("id"); if (skipTargets.Contains (testid)) continue; CatalogTestCase ctc = new CatalogTestCase(EnvOptions.OutputDir, testCase); if (!ctc.Process ()) continue; SingleTestTransform stt = new SingleTestTransform (ctc); string expectedException = (string) expectedExceptions[testid]; bool isKnownFailure = knownFailures.Contains (testid) || fixmeList.Contains (testid); suite.Add (new TestFromCatalog (testid, stt, expectedException, EnvOptions.InverseResults, isKnownFailure)); } }
public void Build() { // if (Environment.GetEnvironmentVariables().Contains("START_DEBUG")) // System.Diagnostics.Debugger.Launch (); ReadLists(); XmlDocument whole = new XmlDocument(); whole.Load(@"testsuite/TESTS/catalog-fixed.xml"); foreach (XmlElement testCase in whole.SelectNodes("test-suite/test-catalog/test-case")) { string testid = testCase.GetAttribute("id"); if (skipTargets.Contains(testid)) { continue; } CatalogTestCase ctc = new CatalogTestCase(EnvOptions.OutputDir, testCase); if (!ctc.Process()) { continue; } SingleTestTransform stt = new SingleTestTransform(ctc); string expectedException = (string)expectedExceptions[testid]; bool isKnownFailure = knownFailures.Contains(testid) || fixmeList.Contains(testid); _suite.Add(new TestFromCatalog(testid, stt, expectedException, EnvOptions.InverseResults, isKnownFailure)); } }
void ProcessTestCase(XmlElement testCase) { string testid = testCase.GetAttribute("id"); Console.Out.WriteLine(testid); if (skipTargets.Contains(testid)) { return; } CatalogTestCase ctc = new CatalogTestCase(EnvOptions.OutputDir, testCase); if (!ctc.Process()) { return; } SingleTestTransform stt = new SingleTestTransform(ctc); stt.RunTest(); if (stt.Succeeded) { using (StreamWriter fw = new StreamWriter(ctc.OutFile, false, Encoding.UTF8)) fw.Write(stt.Result); } else { resultExceptionsWriter.WriteLine("{0}\t{1}", testid, stt.Exception.GetType().ToString()); } }
void ProcessTestCase (XmlElement testCase) { string testid = testCase.GetAttribute ("id"); Console.Out.WriteLine (testid); if (skipTargets.Contains (testid)) return; CatalogTestCase ctc = new CatalogTestCase(EnvOptions.OutputDir, testCase); if (!ctc.Process ()) return; SingleTestTransform stt = new SingleTestTransform (ctc); stt.RunTest (); if (stt.Succeeded) using (StreamWriter fw = new StreamWriter (ctc.OutFile, false, Encoding.UTF8)) fw.Write (stt.Result); else resultExceptionsWriter.WriteLine ("{0}\t{1}", testid, stt.Exception.GetType ().ToString ()); }
public TestFromCatalog(string testid, SingleTestTransform transform, string expectedException, bool inverseResult, bool isKnownFailure) : base(null, testid) { _testid = testid; _expectedException = expectedException; _transform = transform; _inverseResult = inverseResult; ArrayList arr = new ArrayList(); if (isKnownFailure) { arr.Add("KnownFailures"); this.IsExplicit = true; } else { arr.Add("Clean"); } Categories = arr; }
public TestFromCatalog (string testid, SingleTestTransform transform, string expectedException, bool inverseResult, bool isKnownFailure) :base (null, testid) { _testid = testid; _expectedException = expectedException; _transform = transform; _inverseResult = inverseResult; ArrayList arr = new ArrayList (); if (isKnownFailure) { arr.Add ("KnownFailures"); //this.IsExplicit = true; } else arr.Add ("Clean"); Categories = arr; }