Example #1
0
 public Testcase(string testcaseName, TestcaseExecution execution)
 {
     this.TestcaseName = testcaseName;
     this.execution = execution;
     this.Logs = string.Empty;
     this.testcase = new List<Testcase>();
     this.Status = TestcaseStatus.NotRun;
 }
Example #2
0
        public async Task<bool> Run()
        {
            this.Status = TestcaseStatus.Running;
            bool isPass = false;
            
            try
            {
                isPass = await this.execution(this);
                this.Status = isPass ? TestcaseStatus.Passed : TestcaseStatus.Failed;
                Logs = this.Status.ToString();
            }
            catch (Exception ex)
            {
                isPass = false;
                this.Status = TestcaseStatus.Failed;
                Logs = ex.Message;
            }

            return isPass;
        }
Example #3
0
 public void Reset()
 {
     Logs = "";
     this.Status = TestcaseStatus.NotRun;
 }