Beispiel #1
0
        public void OnTestFinish()
        {
            //UpdateResult musi być wywołane za pomocą delegata, inaczej form drze mordę, że inny wątek się dobiera do jego kontrolki
            this.BeginInvoke(new UpdateResultDelegate(UpdateResult));

            if (testStuff.killDriver)
            {
                Thread.Sleep(TimeSpan.FromMilliseconds(Settings.killDriverDelay)); //aby uzytkownik mógł sie przyjrzeć zakończeniu przed zamknięciem przeglądarki; do settingsów
                testStuff.TearDownTest();
            }

            //testStuff = null; //źródło wielu błędów
        }
Beispiel #2
0
        public void OnTestCancel(string reason)
        {
            string query = @"INSERT INTO dps.dpsdynamic.QA_TEST_RESULT (IdPlan, IdBatch, TestResult, DurationSeconds, DateTime, LogPath, ScreenshotsPath) " +
                           @"VALUES (" + currentTestPlan + @", " + currentBatch + @", 'FAIL', " + ((int)((DateTime.Now - currentTestStart).TotalSeconds)).ToString() + @", '" + currentTestStart.ToString() + @"', '" + currentTestStuff.logger.GetFolderPath() + @"', '-1')";

            new ReaderWriterDataBase().TryQueryToDataTable(Settings.connectionString, query, false, out DataTable dataTable); //docelowo showExcMsg = false

            if (currentTestStuff.killDriver)
            {
                currentTestStuff.TearDownTest();
            }

            testRunning = false;
        }