[API V5] projects/{project_id}/test-runs/record
Closed this issue · 1 comments
Hi,
I am trying to use the following spira API: services/v5_0/RestService.svc/projects/547/test-runs/record. The following information is sent in the body:
{
"TestRunFormatId": 1,
"StartDate": "2021-10-21T08:38:41.781585",
"EndDate": "2021-10-21T08:38:41.782163",
"RunnerName": "PyTest",
"RunnerTestName": "test_add_1",
"RunnerMessage": "Test Succeeded",
"RunnerStackTrace": "",
"TestCaseId": "327269",
"ExecutionStatusId": 2,
"TestSetId": 70093
}
When I post this I get status code 400 Bad Request, however, if I remove StartDate and EndDate I get status code 400 but an exception is raised.
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. [System.Data.SqlTypes.SqlTypeException]
Stack Trace:
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
at APPLICATION.Business.SpiraTestEntitiesEx.SaveChanges(SaveOptions options, Nullable1 userId, Boolean updateHistory, Boolean sendNotification, Nullable
1 rollbackId)
at APPLICATION.Business.SpiraTestEntitiesEx.SaveChanges(Nullable1 userId, Boolean updateHistory, Boolean sendNotification, Nullable
1 rollbackId)
at APPLICATION.Business.SpiraTestEntitiesEx.SaveChanges()
at APPLICATION.Business.TestRunManager.Record(Int32 projectId, Int32 testerUserId, Int32 testCaseId, Nullable1 releaseId, Nullable
1 testSetId, Nullable1 testSetTestCaseId, DateTime startDate, DateTime endDate, Int32 executionStatusId, String runnerName, String runnerTestName, Nullable
1 runnerAssertCount, String runnerMessage, String runnerStackTrace, Nullable1 automationHostId, Nullable
1 automationEngineId, Nullable1 buildId, TestRunFormatEnum testRunFormat, List
1 testRunSteps, Boolean updateProjectTestStatus)
at APPLICATION.Web.Services.v5_0.RestService.TestRun_RecordAutomated1(String project_id, RemoteAutomatedTestRun remoteTestRun)
With StartTime and EndTime added in the body, I still don't get status code 200.
Any thoughts on what could be the issue?
If you want support for one of Inflectra’s products please email us at support@inflectra.com. We do not handle support requests over GitHub.