示例#1
0
        public JsonResult MonitorLog(int?id)
        {
            TestRun          testrun    = db.TestRuns.Find(id);
            var              CellName   = db.Cells.Find(testrun.Scenario.CellId).CellName;
            var              ServerOS   = testrun.Scenario.ServerOS;
            RunRemoteService runservice = new RunRemoteService();

            runservice.MonitorRemoteLog(CellName, ServerOS);
            testrun.State = State.Fail;
            return(Json(db.TestRuns.Select(x => new { RunId = x.RunId }), JsonRequestBehavior.AllowGet));
        }
示例#2
0
        public ActionResult RunRemote(int?id)
        {
            TestRun testrun = db.TestRuns.Find(id);

            if (testrun.State == State.InProcess)
            {
                return(RedirectToAction("Index"));
            }
            var CellName = db.Cells.Find(testrun.Scenario.CellId).CellName;
            var ServerOS = testrun.Scenario.ServerOS;
            RunRemoteService runservice = new RunRemoteService();

            runservice.RunScript(CellName, ServerOS);
            testrun.State = State.InProcess;
            db.SaveChanges();
            return(Json(db.TestRuns.Select(x => new { RunId = x.RunId }), JsonRequestBehavior.AllowGet));
        }