public static void SetMasterScriptWriteStatus(string testSuiteId) { string userName = WinComponent.loginUser; string buildDate = GlobalFunction.ExecutionTime(); MySQLConnector.RunQuery("UPDATE testsuites SET WRITE_STATUS=1, BUILD_DATE='" + buildDate + "', BUILDER='" + userName + "' WHERE TS_ID=" + testSuiteId); }
public static void SetScriptCommit(string testSuiteId, string testCaseId, string commitMessage) { string commitDate = GlobalFunction.ExecutionTime(); MySQLConnector.RunQuery("UPDATE testsuites SET LAST_COMMIT_DATE='" + commitDate + "', LAST_COMMIT_MESSAGE='" + commitMessage + "' WHERE ts_id=" + testSuiteId); if (testCaseId != "XXX") { MySQLConnector.RunQuery("UPDATE testcases SET LAST_COMMIT_DATE='" + commitDate + "', LAST_COMMIT_MESSAGE='" + commitMessage + "' WHERE ts_id=" + testSuiteId + " AND tc_id=" + testCaseId); } }
public static void SetScriptWriteStatus(string testSuiteId, string testCaseId) { string ranorexVersion = Ranorex.Host.Local.RanorexVersion; ranorexVersion = ranorexVersion.Remove(ranorexVersion.Length - 2); string executionTime = GlobalFunction.ExecutionTime(); string userName = WinComponent.loginUser; MySQLConnector.RunQuery("UPDATE testcases SET WRITE_STATUS=1, RX_VERSION='" + ranorexVersion + "', BUILD_DATE='" + executionTime + "', BUILDER='" + userName + "' WHERE TS_ID=" + testSuiteId + " AND TC_ID=" + testCaseId); }
public static void SetUserStatus(string userName, bool logout) { if (WinComponent.isDbOk) { if (logout) { MySQLConnector.RunQuery("UPDATE designers SET ACCESS_POINT=REPLACE(ACCESS_POINT, 'Main|','') WHERE USERNAME='******' AND ACCESS_POINT LIKE '%Web%'"); MySQLConnector.RunQuery("UPDATE designers SET STATUS=0, ACCESS_POINT=NULL WHERE USERNAME='******' AND ACCESS_POINT='Main|'"); } else { MySQLConnector.RunQuery("UPDATE designers SET STATUS=1, ACCESS_POINT=CONCAT(ACCESS_POINT, 'Main|') WHERE USERNAME='******' AND ACCESS_POINT NOT LIKE '%Main%'"); MySQLConnector.RunQuery("UPDATE designers SET STATUS=1, ACCESS_POINT='Main|' WHERE USERNAME='******' AND ACCESS_POINT IS NULL"); } } }
public static bool CheckScriptsExist(string testsuite_id) { string test_suite_title = MySQLConnector.GetTestSuiteInfo(testsuite_id, 2); string scriptFolder = (GlobalFunction.GetConfigSettings("ScriptsDir")).Replace("%DBName%", "v" + WinComponent.sxDBVersion); //GlobalFunction.GetConfigSettings("ScriptsDir"); string script_path = scriptFolder + @"\TS_" + testsuite_id + "_" + test_suite_title.Replace(' ', '_').Replace('-', '_') + "\\"; List <string> test_cases = MySQLConnector.GetTestCaseList(testsuite_id); bool result = true; if (test_cases.Count == 0) { result = false; } foreach (string test_case in test_cases) { string test_case_title = "TC_" + test_case + "_" + MySQLConnector.GetTestCaseInfo(testsuite_id, test_case, 3).Replace(' ', '_').Replace('-', '_'); if (!File.Exists(script_path + test_case_title + "\\" + test_case_title + ".exe")) { result = false; break; } } return(result); }