Esempio n. 1
0
        public JsonResult SaveUserActions(string pageUrl, string userToken, string caseToken, long timeStamp, string userEvent = null, string coordinates = null)
        {
            var targetUrl = this.CaseRepository.GetCaseApiResult(caseToken);

            if (userEvent == "finishtest")
            {
                if (targetUrl.EndPage != pageUrl)
                {
                    userEvent = "failed";
                }
            }

            var testCasesState = new TestCasesStates
            {
                PageUrl = pageUrl,
                UserToken = userToken,
                CaseToken = caseToken,
                Coordinates = coordinates,
                Event = userEvent,
                TimeStamp = timeStamp
            };
            TestStatuses.AddState(testCasesState);
            return Json("success", JsonRequestBehavior.AllowGet);
        }
Esempio n. 2
0
 /// <summary>
 /// Create a new TestCasesStates object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="pageUrl">Initial value of the PageUrl property.</param>
 /// <param name="timeStamp">Initial value of the TimeStamp property.</param>
 /// <param name="userToken">Initial value of the UserToken property.</param>
 /// <param name="caseToken">Initial value of the CaseToken property.</param>
 public static TestCasesStates CreateTestCasesStates(global::System.Int32 id, global::System.String pageUrl, global::System.Int64 timeStamp, global::System.String userToken, global::System.String caseToken)
 {
     TestCasesStates testCasesStates = new TestCasesStates();
     testCasesStates.Id = id;
     testCasesStates.PageUrl = pageUrl;
     testCasesStates.TimeStamp = timeStamp;
     testCasesStates.UserToken = userToken;
     testCasesStates.CaseToken = caseToken;
     return testCasesStates;
 }
Esempio n. 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the TestCasesStates EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTestCasesStates(TestCasesStates testCasesStates)
 {
     base.AddObject("TestCasesStates", testCasesStates);
 }
Esempio n. 4
0
 public void AddState(TestCasesStates status)
 {
     this.db.TestCasesStates.AddObject(status);
     this.db.SaveChanges();
 }