/// <summary> /// called on execution of task. Sends the new testcases to the Testservice. /// </summary> /// <returns>boolean with true in success case, else returns false</returns> public override bool Execute() { try { Log.LogMessage(MessageImportance.Normal, "Starting UITests at " + EndpointAdress); using (WcfClient wcfClient = new WcfClient(EndpointAdress)) { Guid testjob = wcfClient.SendFile(TestFile, TestUrl.ToLower()); Log.LogMessage(MessageImportance.Normal, "Started testjob with id " + testjob); WriteTestjobFile(testjob.ToString()); } } catch (Exception exception) { Log.LogErrorFromException(exception); return(false); } return(true); }
/// <summary> /// called on execution of task. Sends the new testcases to the Testservice. /// </summary> /// <returns>boolean with true in success case, else returns false</returns> public override bool Execute() { try { Log.LogMessage(MessageImportance.Normal, "Updating Testcases: START."); string stage = Stage.ToLower(); Log.LogMessage(MessageImportance.Normal, "Updating Testcases: " + stage + ".dll -> " + EndpointAdress); using (WcfClient wcfClient = new WcfClient(EndpointAdress)) { wcfClient.SendFile(File, stage, ReleaseManager, Testsuite, Branch, CommitId, CommitMessage); Log.LogMessage(MessageImportance.Normal, "Updating Testcases: SUCCESS."); Log.LogMessage(MessageImportance.Normal, "Testresults will be sent to " + ReleaseManager); } } catch (Exception exception) { Log.LogErrorFromException(exception); return(false); } return(true); }
/// <summary> /// called on execution of task. Sends the new testcases to the Testservice. /// </summary> /// <returns>boolean with true in success case, else returns false</returns> public override bool Execute() { try { Log.LogMessage(MessageImportance.Normal, "Starting UITests at " + EndpointAdress); using (WcfClient wcfClient = new WcfClient(EndpointAdress)) { Guid testjob = wcfClient.SendFile(TestFile, TestUrl.ToLower() ); Log.LogMessage(MessageImportance.Normal, "Waiting for Testresults. " + "Testjobid: " + testjob); wcfClient.WaitForTestJobResult(testjob); string resultFile = wcfClient.GetResultFile(testjob); WriteResultFile(resultFile); } } catch(Exception exception) { Log.LogErrorFromException(exception); return false; } return true; }
/// <summary> /// called on execution of task. Checks the results file, if all tests passed. /// </summary> /// <returns>boolean with true in success case, else returns false</returns> public override bool Execute() { try { string content = File.ReadAllText(TestjobFile).Trim(); Guid testjob = new Guid(content); using (WcfClient wcfClient = new WcfClient(EndpointAdress)) { Log.LogMessage(MessageImportance.Normal, "Waiting for Testresults. " + "Testjobid: " + testjob); wcfClient.WaitForTestJobResult(testjob); string resultFile = wcfClient.GetResultFile(testjob); WriteResultFile(resultFile); } } catch (Exception exception) { Log.LogErrorFromException(exception); return(false); } return(true); }
/// <summary> /// called on execution of task. Sends the new testcases to the Testservice. /// </summary> /// <returns>boolean with true in success case, else returns false</returns> public override bool Execute() { try { Log.LogMessage(MessageImportance.Normal, "Updating Testcases: START."); string stage = Stage.ToLower(); Log.LogMessage(MessageImportance.Normal, "Updating Testcases: " + stage + ".dll -> " + EndpointAdress); using (WcfClient wcfClient = new WcfClient(EndpointAdress)) { wcfClient.SendFile(File, stage, ReleaseManager, Testsuite, Branch, CommitId, CommitMessage); Log.LogMessage(MessageImportance.Normal, "Updating Testcases: SUCCESS."); Log.LogMessage(MessageImportance.Normal, "Testresults will be sent to " + ReleaseManager ); } } catch(Exception exception) { Log.LogErrorFromException(exception); return false; } return true; }