Upload start and end times for the result
We need to update the start and end time of the test Change-Id: I42f99a024ca056a5adb4ba2568b1c474f4620ffa
This commit is contained in:
@@ -13,12 +13,12 @@ class TestCaseResultOperation:
|
|||||||
def create_test_case_result(self, test_case_result: TestCaseResult):
|
def create_test_case_result(self, test_case_result: TestCaseResult):
|
||||||
"""
|
"""
|
||||||
Creates a test case result in the database
|
Creates a test case result in the database
|
||||||
Args:
|
|
||||||
test_case_result ():
|
|
||||||
|
|
||||||
Returns:
|
Args:
|
||||||
|
test_case_result (TestCaseResult): the test case result
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
# fmt: off
|
||||||
create_test_case_result = (
|
create_test_case_result = (
|
||||||
"INSERT INTO test_case_result (test_info_id, execution_result, start_time, end_time, test_run_execution_id, log_hostname, log_location) "
|
"INSERT INTO test_case_result (test_info_id, execution_result, start_time, end_time, test_run_execution_id, log_hostname, log_location) "
|
||||||
f"VALUES ({test_case_result.test_info_id}, '{test_case_result.execution_result}', '{test_case_result.start_time}', "
|
f"VALUES ({test_case_result.test_info_id}, '{test_case_result.execution_result}', '{test_case_result.start_time}', "
|
||||||
@@ -30,17 +30,19 @@ class TestCaseResultOperation:
|
|||||||
def update_test_case_result(self, test_case_result: TestCaseResult):
|
def update_test_case_result(self, test_case_result: TestCaseResult):
|
||||||
"""
|
"""
|
||||||
Updates a test case result in the database
|
Updates a test case result in the database
|
||||||
Args:
|
|
||||||
test_case_result ():
|
|
||||||
|
|
||||||
Returns:
|
Args:
|
||||||
|
test_case_result (TestCaseResult): the testcase result
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
# fmt: off
|
||||||
create_test_case_result = (
|
create_test_case_result = (
|
||||||
"UPDATE test_case_result "
|
"UPDATE test_case_result "
|
||||||
f"SET execution_result='{test_case_result.get_execution_result()}', "
|
f"SET execution_result='{test_case_result.get_execution_result()}', "
|
||||||
f"log_hostname='{test_case_result.log_hostname}', "
|
f"log_hostname='{test_case_result.log_hostname}', "
|
||||||
f"log_location='{test_case_result.log_location}' "
|
f"log_location='{test_case_result.log_location}', "
|
||||||
|
f"start_time='{test_case_result.start_time}', "
|
||||||
|
f"end_time='{test_case_result.end_time}' "
|
||||||
f"WHERE test_case_result_id={test_case_result.get_test_case_result_id()}"
|
f"WHERE test_case_result_id={test_case_result.get_test_case_result_id()}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user