• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

testit-tms / adapters-python / 23762390641

30 Mar 2026 07:01PM UTC coverage: 17.402% (+0.02%) from 17.381%
23762390641

push

github

web-flow
feat: support custom statuses. (#246)

* feat: support custom statuses.

* feat: support custom statuses.

* fix: set status for behave.

* fix: update sync-storage

* chore: update sync-storage version

* chore: update runner logic to type only

* chore: update version

* chore: update ci

* chore: update sync-storage version

* fix messages from failed steps for robotframework.

* fix: set status for behave.

* fix: small sync-storage fixes

* chore: update ci

---------

Co-authored-by: pavel.butuzov <pavel.butuzov@testit.software>
Co-authored-by: Dmitry Ermakovich <dmitry.ermakovich@testit.software>

7 of 54 new or added lines in 10 files covered. (12.96%)

2 existing lines in 2 files now uncovered.

284 of 1632 relevant lines covered (17.4%)

0.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/testit-adapter-robotframework/src/testit_adapter_robotframework/utils.py
1
import hashlib
×
2
from datetime import datetime
×
3
from typing import List
×
4

5
from testit_python_commons.models.step_result import StepResult
×
6
from testit_python_commons.models.test_result import TestResult
×
NEW
7
from testit_python_commons.models.outcome_type import OutcomeType
×
NEW
8
from testit_python_commons.models.status_type import StatusType
×
9

10

11
def convert_time(time):
×
12
    date = datetime.strptime(time, "%Y%m%d %H:%M:%S.%f")
×
13
    date = date.replace(tzinfo=datetime.now().astimezone().tzinfo)
×
14
    return date
×
15

16

17
def convert_executable_test_to_test_result_model(executable_test: dict) -> TestResult:
×
18
    return TestResult()\
×
19
        .set_external_id(executable_test['externalID'])\
20
        .set_autotest_name(executable_test['autoTestName'])\
21
        .set_step_results(
22
            step_results_to_autotest_steps_model(executable_test['stepResults']))\
23
        .set_setup_results(
24
            step_results_to_autotest_steps_model(executable_test['setUpResults']))\
25
        .set_teardown_results(
26
            step_results_to_autotest_steps_model(executable_test['tearDownResults']))\
27
        .set_duration(executable_test['duration'])\
28
        .set_outcome(executable_test['outcome'])\
29
        .set_status_type(executable_test['status_type'])\
30
        .set_traces(executable_test['traces'])\
31
        .set_attachments(executable_test['attachments'])\
32
        .set_parameters(executable_test['parameters'])\
33
        .set_properties(executable_test['properties'])\
34
        .set_namespace(executable_test['namespace'])\
35
        .set_classname(executable_test['classname'])\
36
        .set_title(executable_test['title'])\
37
        .set_description(executable_test['description'])\
38
        .set_links(executable_test['links'])\
39
        .set_result_links(executable_test['resultLinks'])\
40
        .set_labels(executable_test['labels']) \
41
        .set_tags(executable_test['tags'])\
42
        .set_work_item_ids(executable_test['workItemsID'])\
43
        .set_message(executable_test['message'])\
44
        .set_external_key(executable_test['externalKey'])
45

46

47
def step_results_to_autotest_steps_model(step_results: dict) -> List[StepResult]:
×
48
    autotest_model_steps = []
×
49

50
    for step_result in step_results:
×
51
        step_result_model = StepResult()\
×
52
            .set_title(step_result['title'])\
53
            .set_description(step_result['description'])\
54
            .set_outcome(step_result['outcome'])\
55
            .set_duration(step_result['duration'])\
56
            .set_attachments(step_result['attachments'])
57

58
        if 'parameters' in step_result:
×
59
            step_result_model.set_parameters(step_result['parameters'])
×
60

61
        if 'step_results' in step_result:
×
62
            step_result_model.set_step_results(
×
63
                step_results_to_autotest_steps_model(step_result['step_results']))
64

65
        autotest_model_steps.append(step_result_model)
×
66

67
    return autotest_model_steps
×
68

69

70
def get_hash(value: str):
×
71
    md = hashlib.sha256(bytes(value, encoding='utf-8'))
×
72
    return md.hexdigest()
×
73

74

NEW
75
STEP_STATUSES = {
×
76
    'FAIL': OutcomeType.FAILED,
77
    'PASS': OutcomeType.PASSED,
78
    'SKIP': OutcomeType.SKIPPED,
79
    'NOT RUN': OutcomeType.SKIPPED
80
}
NEW
81
STATUS_TYPES = {
×
82
    'FAIL': StatusType.FAILED,
83
    'PASS': StatusType.SUCCEEDED,
84
    'SKIP': StatusType.INCOMPLETE,
85
    'NOT RUN': StatusType.INCOMPLETE
86
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc