Ejemplo n.º 1
0
        public void SaveTestRun(TestRunDto testRunDto)
        {
            var testRun   = testRunDto.Map();
            var imgFolder = _locationsProvider.GetScreenshotPath(testRun.TestInfo.Guid.ToString());
            var imgFiles  = new DirectoryInfo(imgFolder).GetFiles("*.png");

            foreach (var imgFile in imgFiles)
            {
                if (imgFile.CreationTime > testRun.TestInfo.Start)
                {
                    testRun.Screenshots.Add(new TestScreenshot(imgFile.CreationTime));
                }
            }
            testRun.Save(_locationsProvider.GetTestPath(testRun.TestInfo.Guid.ToString()));
            testRun.TestInfo.SaveTestInfo(_locationsProvider);
        }
Ejemplo n.º 2
0
 public static void SaveTestInfo(this ItemInfo testInfo, ILocationsProvider locationsProvider)
 {
     testInfo.SaveItemInfo(locationsProvider.GetTestPath(testInfo.Guid.ToString()), locationsProvider.Paths.File.Tests, false);
 }