From d50fe4c3adb7d892625d4df21578273a19a455b6 Mon Sep 17 00:00:00 2001 From: Muriel Salvan Date: Mon, 11 Jan 2021 14:05:34 +0100 Subject: [PATCH] Don't run tests already having a status, and mark tests started --- Data/Source/Scripts/AutoTest_Suite.psc | 3 ++- Data/Source/Scripts/AutoTest_Suite_Locations.psc | 3 ++- Data/Source/Scripts/AutoTest_Suite_NPCs.psc | 3 ++- Data/Source/Scripts/AutoTest_TestsRunner.psc | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Data/Source/Scripts/AutoTest_Suite.psc b/Data/Source/Scripts/AutoTest_Suite.psc index 0d44f81..6fb3927 100644 --- a/Data/Source/Scripts/AutoTest_Suite.psc +++ b/Data/Source/Scripts/AutoTest_Suite.psc @@ -29,7 +29,8 @@ function BeforeTestsRun() ; To be overriden endFunction -; Run a given registered test +; Run a given registered test. +; Set the status in this method. ; [API] This function is mandatory ; ; Parameters:: diff --git a/Data/Source/Scripts/AutoTest_Suite_Locations.psc b/Data/Source/Scripts/AutoTest_Suite_Locations.psc index 80b2a21..98fd4dc 100644 --- a/Data/Source/Scripts/AutoTest_Suite_Locations.psc +++ b/Data/Source/Scripts/AutoTest_Suite_Locations.psc @@ -43,7 +43,8 @@ function BeforeTestsRun() ConsoleUtil.ExecuteCommand("setini \"bForceAutoVanityMode:Camera\" 1") endFunction -; Run a given registered test +; Run a given registered test. +; Set the status in this method. ; [API] This function is mandatory ; ; Parameters:: diff --git a/Data/Source/Scripts/AutoTest_Suite_NPCs.psc b/Data/Source/Scripts/AutoTest_Suite_NPCs.psc index da6557d..f5fab38 100644 --- a/Data/Source/Scripts/AutoTest_Suite_NPCs.psc +++ b/Data/Source/Scripts/AutoTest_Suite_NPCs.psc @@ -33,7 +33,8 @@ function BeforeTestsRun() ConsoleUtil.ExecuteCommand("tai") endFunction -; Run a given registered test +; Run a given registered test. +; Set the status in this method. ; [API] This function is mandatory ; ; Parameters:: diff --git a/Data/Source/Scripts/AutoTest_TestsRunner.psc b/Data/Source/Scripts/AutoTest_TestsRunner.psc index c367210..3f007f5 100644 --- a/Data/Source/Scripts/AutoTest_TestsRunner.psc +++ b/Data/Source/Scripts/AutoTest_TestsRunner.psc @@ -131,8 +131,9 @@ function RunTests(Quest questScript) global while idxTest < nbrTests && InTestsSession() string testName = scriptTest.GetTestName(idxTest) string testStatus = scriptTest.GetTestStatus(testName) - if testStatus != "ok" + if testStatus == "" || testStatus == "started" AutoTest_Log.Log("[ " + testType + " / " + testName + " (" + testStatus + ") ] - Start test") + scriptTest.SetTestStatus(testName, "started") scriptTest.RunTest(testName) AutoTest_Log.Log("[ " + testType + " / " + testName + " (" + scriptTest.GetTestStatus(testName) + ") ] - Test end") endIf