feat: add shared test acceptance and release 1.5.0
This commit is contained in:
1 parent
3fbcdfefea
commit
ec2c1265d3
35 files changed
+826
-51
No files matched your search
@@ -13,6 +13,7 @@ from apps.admin_console.services import automation_service as service
|
||||
from apps.admin_console.services import batch_archive as archive_service
|
||||
from apps.admin_console.services import report_export, task_import
|
||||
from artemis.config.settings import settings
|
||||
from artemis.runtime.case_result import read_case_result
|
||||
|
||||
router = APIRouter(prefix="/api/automation", tags=["automation"])
|
||||
|
||||
@@ -122,7 +123,12 @@ def batch_by_request(request_id: str):
|
||||
|
||||
@router.get("/batches/{batch_id}")
|
||||
def batch_detail(batch_id: str):
|
||||
return {**require("batch", batch_id), "jobs": store.jobs(batch_id)}
|
||||
jobs = store.jobs(batch_id)
|
||||
for job in jobs:
|
||||
job["test_result"] = read_case_result(
|
||||
job["session_id"], job["status"], job.get("error") or ""
|
||||
)
|
||||
return {**require("batch", batch_id), "jobs": jobs}
|
||||
|
||||
|
||||
@router.delete("/batches/{batch_id}")
|
||||
@@ -260,6 +266,9 @@ def history(
|
||||
items = [dict(row) for row in rows]
|
||||
jobs = store.jobs_for_sessions([item["session_id"] for item in items])
|
||||
for item in items:
|
||||
item["test_result"] = read_case_result(
|
||||
item["session_id"], item["status"], item.get("error") or ""
|
||||
)
|
||||
if job := jobs.get(item["session_id"]):
|
||||
item["name"] = task_import.execution_title(job)
|
||||
item["iteration"] = job.get("iteration", 1)
|
||||
|
||||
Reference in new issue
Block a user