public IList <AnnotatedTest> CollectAnnotatedTests(string directory, ref IList <IndividualTest> tests) { var pytest = EngineFactory.Pytest(); var parser = new AnnotatedTestParser(); var temp = Path.Combine(directory, "annotated_test.xml"); var annotatedTests = new List <AnnotatedTest>(); foreach (var test in tests) { pytest.Run($"{test.TestName} --junitxml={temp}", "$null", directory); var annotation = parser.GatherAnnotatedTest(temp); annotation.IndividualTest = test; annotatedTests.Add(annotation); } File.Delete(temp); return(annotatedTests); }
public IList <IndividualTest> CollectTestCases(string testDirectory, string solution, ref EngineWorkingDirectories workingDirectories) { AnnotatedTestParser testParser = new AnnotatedTestParser(); string path = GetDirectoryPaths(testDirectory, solution, ref workingDirectories); var annotations = testParser.Setup(path, null, workingDirectories); List <IndividualTest> individualTests = new List <IndividualTest>(); foreach (AnnotatedTest t in annotations) { individualTests.Add(t.IndividualTest); } annotatedTests = annotations; return(individualTests); }
public void Init() { Parser = new AnnotatedTestParser(); CurrentDirectory = Directory.GetCurrentDirectory(); }