docsteady package¶
Submodules¶
docsteady.config module¶
- class docsteady.config.Config¶
Bases:
object
Configuration for docsteady.
- ATM_API = 'https://api.zephyrscale.smartbear.com/v2/'¶
- ATTACHMENT_FOLDER = 'attachments/'¶
- AUTH: Any = None¶
- CACHED_ISSUES: dict[str, Issue] = {}¶
- CACHED_LIBTESTCASES: dict = {}¶
- CACHED_POINTERS: dict = {}¶
- CACHED_REQS_FOR_VES: dict = {}¶
- CACHED_TESTCASES: dict = {}¶
- CACHED_TESTRES_SUM: dict = {}¶
- CACHED_TEST_EXECUTIONS: dict = {}¶
- CACHED_USERS: dict[str, dict] = {}¶
- CACHED_VELEMENTS: dict[str, Issue] = {}¶
- COMPONENTS = {'CAM': 'Camera Subsystem', 'DM': 'Data Management Subsystem', 'EPO': 'Education and Public Outreach Subsystem', 'OCS': 'Observatory Control System Subsystem', 'PSE': 'Project System Engineering and Commissioning', 'T&S': 'Telescope and Site Subsystem'}¶
- DOC: Any = None¶
- DOCUSHARE_DOC_PATTERN = re.compile('\\b(LDM|LSE|DMTN|DMTR|TSS|LPM|LTS)(-\\d+)\\b(?!-)')¶
- DOC_NAMES = ['LDM', 'LSE', 'DMTN', 'DMTR', 'TSS', 'LPM', 'LTS']¶
- DOWNLOAD_IMAGES = True¶
- GET_ISSUE_COMPONENT = 'https://rubinobs.atlassian.net/rest/api/3//issue/{issue}?fields=components,customfield_15001'¶
- HIGH_LEVEL_REQS_FIELD = 'customfield_13515'¶
- IMAGE_FOLDER = 'jira_imgs/'¶
- INCLUDE_ALL_EXECS: bool = False¶
- ISSUES_TO_TESTRESULTS: dict = {}¶
- ISSUE_UI_URL = 'https://rubinobs.atlassian.net/browse/{issue}'¶
- ISSUE_URL = 'https://rubinobs.atlassian.net/rest/api/3//issue/{issue}?&expand=renderedFields'¶
- JIRA_API = 'https://rubinobs.atlassian.net/rest/api/3/'¶
- JIRA_INSTANCE = 'https://rubinobs.atlassian.net'¶
- MAX_IMG_PIXELS = 450¶
- MILESTONE_PATTERN = re.compile('\\b(LDM|LSE|DMTN|DMTR|TSS|LPM|LTS)(-\\d+-\\d+)([\\s\\.])')¶
- MIN_IMG_PIXELS = 32¶
- MODE_PREFIX: Any = None¶
- NAMESPACE: Any = None¶
- OUTPUT_FORMAT: Any = None¶
- PANDOC_TYPE: None = None¶
- PROJECT: str = 'LVV'¶
- REQID_FIELD = 'customfield_12001'¶
- REQUIREMENTS_TO_TESTCASES: dict = {}¶
- REQ_PER_DOC: dict = {}¶
- REQ_STATUS_COUNT: Counter = {}¶
- REQ_STATUS_PER_DOC_COUNT: Counter = {}¶
- TEMPLATE_DIRECTORY: str = '.'¶
- TEMPLATE_LANGUAGE: str = 'latex'¶
- TESTCASE_SEARCH_URL = 'https://api.zephyrscale.smartbear.com/v2//testcase/search'¶
- TESTCASE_STATUS_LIST = ['Defined', 'Approved', 'Draft']¶
- TESTCASE_UI_URL = 'https://rubinobs.atlassian.net/projects/LVV?selectedItem=com.atlassian.plugins.atlassian-connect-plugin:com.kanoah.test-manager__main-project-page#!/v2/testCase/{testcase}'¶
- TEST_STATUS_COUNT: Counter = {}¶
- THE_SESSION: Session | None = None¶
- THE_ZEPHYR: ZephyrScale = None¶
- TIMEZONE = 'US/Pacific'¶
- USER_URL = 'https://rubinobs.atlassian.net/rest/api/3//people/{accountId}'¶
- VE_COMPONENT_URL = 'https://rubinobs.atlassian.net/rest/api/3//search?jql=project%20%3D%20LVV%20and%20component%20%3D%20%22{cmpnt}%22%20%20and%20issuetype%20%3D%20Verification%20ORDER%20BY%20key%20ASC&fields=key&maxResults={maxR}&startAt={startAt}'¶
- VE_NULLSUBCMP_URL = 'https://rubinobs.atlassian.net/rest/api/3//search?jql=project%20%3D%20LVV%20and%20component%20%3D%20%22{cmpnt}%22%20%20AND%20Sub-Component%20is%20null%20and%20issuetype%20%3D%20Verification%20ORDER%20BY%20key%20ASC&fields=key&maxResults={maxR}&startAt={startAt}'¶
- VE_SEARCH_URL = 'https://rubinobs.atlassian.net/rest/api/3//search?jql=project%20%3D%20LVV%20AND%20component%20%20%3D%20%27{cmpnt}%27%20and%20issuetype%20%3D%20Verification&fields=key,summary,customfield_13511,customfield_13513,customfield_12002,customfield_12206,customfield_13703&maxResults={maxR}'¶
- VE_STATUS_COUNT: Counter = {}¶
- VE_SUBCMP_URL = 'https://rubinobs.atlassian.net/rest/api/3//search?jql=project%20%3D%20LVV%20and%20component%20%3D%20%22{cmpnt}%22%20%20and%20Sub-Component%20%20%3D%20%27{subcmp}%27%20and%20issuetype%20%3D%20Verification%20ORDER%20BY%20key%20ASC&fields=key&maxResults={maxR}&startAt={startAt}'¶
- ZEPHYR_TOKEN = 'set in env or with --token'¶
- coverage = [{'id': 0, 'key': 'FullyVerified', 'label': 'sec:fullyverified', 'name': 'Fully Verified'}, {'id': 1, 'key': 'PartiallyVerified', 'label': 'sec:partiallyverified', 'name': 'Partially Verified'}, {'id': 2, 'key': 'WithFailures', 'label': 'sec:withfaulres', 'name': 'With Failures'}, {'id': 3, 'key': 'NotVerified', 'label': 'sec:notverified', 'name': 'Not Verified'}, {'id': 4, 'key': 'NotCovered', 'label': 'sec:notcovered', 'name': 'Not Covered'}]¶
- doc_pattern_text = '\\b(LDM|LSE|DMTN|DMTR|TSS|LPM|LTS)(-\\d+)\\b(?!-)'¶
- exeuction_errored = False¶
- jpr = {'1': 'Blocker', '10000': 'Undefined', '10100': '1', '10101': '1a', '10102': '1b', '10103': '2', '10104': '3', '10200': 'Standard', '10201': 'Urgent', '10300': 'SUMMIT-1', '10301': 'SUMMIT-2', '10302': 'SUMMIT-3', '10303': 'SUMMIT-4', '10304': 'SUMMIT-5', '10400': 'TEST-TEMP', '10401': 'Low', '10402': 'Medium', '10403': 'High', '2': 'Critical', '3': 'Major', '4': 'Minor', '5': 'Trivial'}¶
- jst = {'1': 'Unplanned', '10000': 'Deferred', '10001': 'To Do', '10002': 'Done', '10004': 'In Review', '10006': 'Acknowledged', '10101': 'Reviewed', '10301': 'Code Review', '10401': 'Planning', '10403': 'Blocked', '10404': 'Awaiting Signoff', '10405': "Won't Fix", '10505': "Can't Reproduce", '10605': 'Withdrawn', '10606': 'Flagged', '10705': 'Retired', '10805': 'Proposed', '10806': 'Adopted', '10906': 'Duplicate', '11005': 'Invalid', '11105': 'Implemented', '11205': 'Backlog', '11206': 'Selected for Development', '11207': 'With PubBoard', '11208': 'With Reviewer', '11209': 'With Project', '11210': 'Closeout Review', '11211': 'Denied', '11212': 'Journal Submitted', '11213': 'Journal In Review', '11214': 'Journal In Press', '11215': 'With Author', '11305': 'Active', '11306': 'In Analysis', '11307': 'Passed', '11405': 'Board Recommended', '11505': 'Manager Approved', '11506': 'Discuss', '11507': 'PM Approval', '11508': 'Returned', '11605': 'Review', '11606': 'Cancelled', '11705': 'Covered', '11706': 'In Verification', '11707': 'Verified', '11708': 'Monitoring', '11709': 'Failed', '11710': 'Verified w/ Deviation', '11711': 'Accepted', '11712': 'Not Covered', '11713': 'Descoped', '11714': 'Out of Compliance', '11805': 'CCB Review', '11806': 'Impact Analysis', '11905': 'Waiting', '11906': 'Subordinated', '11907': 'Active Risk/Opportunity', '11908': 'Realized', '11909': 'Deprecated', '12005': 'Requested', '12105': 'FRB Review', '12106': 'CA Approved', '12107': 'SE Review', '12205': 'Planned', '12305': 'Admin Review', '12405': 'Open', '12406': 'Under Review', '12407': 'Maintenance Approved', '12408': 'Rejected', '12505': 'Admin Request', '12506': 'Traveler Input Required', '12507': 'Fulfilled', '12508': 'Reqless Request', '12509': 'Proposed Task', '12605': 'Safety Review', '12606': 'Unverified', '12705': 'Investigation', '12706': 'Waiting Customer', '12707': 'Waiting External', '12708': 'Pending Approval', '12709': 'Pending Review', '12710': 'Pending Documentation', '12711': 'Escalated L2', '12712': 'Escalated L3', '12805': 'Parametric Configuration', '3': 'In Progress', '4': 'Reopened', '5': 'Resolved', '6': 'Closed'}¶
- milestone_pattern_text = '\\b(LDM|LSE|DMTN|DMTR|TSS|LPM|LTS)(-\\d+-\\d+)([\\s\\.])'¶
- tcresults = [{'id': 0, 'key': 'passed', 'label': 'sec:pass', 'name': 'Passed'}, {'id': 1, 'key': 'cndpass', 'label': 'sec:condpass', 'name': 'P. w/Dev.'}, {'id': 2, 'key': 'failed', 'label': 'sec:fail', 'name': 'Failed'}, {'id': 3, 'key': 'NotExecuted', 'label': 'sec:notexec', 'name': 'Not Ex.'}]¶
docsteady.cycle module¶
Code for Test Report (Run) Model Generation
- class docsteady.cycle.ScriptResult(*, only=None, exclude=(), many=None, context=None, load_only=(), dump_only=(), partial=None, unknown=None)¶
Bases:
Schema
- Parameters:
only (
Union
[Sequence
[str
],AbstractSet
[str
],None
], default:None
)exclude (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)many (
bool
|None
, default:None
)context (
dict
|None
, default:None
)load_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)dump_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)partial (
Union
[bool
,Sequence
[str
],AbstractSet
[str
],None
], default:None
)unknown (
str
|None
, default:None
)
- extract_custom_fields(data, **kwargs)¶
- Parameters:
data (
dict
)kwargs (
List
[str
])
- Return type:
dict
- opts: typing.Any = <marshmallow.schema.SchemaOpts object>¶
- postprocess(data, **kwargs)¶
- Parameters:
data (
dict
)kwargs (
List
[str
])
- Return type:
dict
- class docsteady.cycle.TestCycle(*, only=None, exclude=(), many=None, context=None, load_only=(), dump_only=(), partial=None, unknown=None)¶
Bases:
Schema
- Parameters:
only (
Union
[Sequence
[str
],AbstractSet
[str
],None
], default:None
)exclude (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)many (
bool
|None
, default:None
)context (
dict
|None
, default:None
)load_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)dump_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)partial (
Union
[bool
,Sequence
[str
],AbstractSet
[str
],None
], default:None
)unknown (
str
|None
, default:None
)
- extract_custom_fields(data, **kwargs)¶
- Parameters:
data (
dict
)kwargs (
List
[str
])
- Return type:
dict
- opts: typing.Any = <marshmallow.schema.SchemaOpts object>¶
- process_test_plans(data)¶
Test plan is in links now and it is a pointer the target on the pointer gives a 404 -
- Parameters:
data (
dict
)- Return type:
list
[str
]
-
test_items:
List
[TestResult
] = []¶
- class docsteady.cycle.TestResult(*, only=None, exclude=(), many=None, context=None, load_only=(), dump_only=(), partial=None, unknown=None)¶
Bases:
Schema
- Parameters:
only (
Union
[Sequence
[str
],AbstractSet
[str
],None
], default:None
)exclude (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)many (
bool
|None
, default:None
)context (
dict
|None
, default:None
)load_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)dump_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)partial (
Union
[bool
,Sequence
[str
],AbstractSet
[str
],None
], default:None
)unknown (
str
|None
, default:None
)
- extract_custom_fields(data, **kwargs)¶
- Parameters:
data (
dict
)kwargs (
List
[str
])
- Return type:
dict
- opts: typing.Any = <marshmallow.schema.SchemaOpts object>¶
- postprocess(data, **kwargs)¶
- Parameters:
data (
dict
)kwargs (
List
[str
])
- Return type:
dict
- process_issue_links(links)¶
- Parameters:
links (
dict
)- Return type:
list
|None
docsteady.formatters module¶
- docsteady.formatters.alphanum_key(key)¶
Turn a string into a list of string and number chunks. :type key: str
- Parameters:
key (
str
)- Return type:
list
[str
|int
]
- docsteady.formatters.alphanum_map_array_sort(mapping)¶
Updated the sorted result arrays in the map map map (map) list
- Parameters:
mapping (
dict
[str
,Any
])- Return type:
dict
[str
,Any
]
- docsteady.formatters.alphanum_map_sort(mapping)¶
Return a new map according to the alphanum sorting of it
- Parameters:
mapping (
dict
[str
,Any
])- Return type:
dict
[str
,Any
]
- docsteady.formatters.as_anchor(text)¶
Convert text to an anchor tag. :type text:
str
Text to convert to an anchor :rtype:str
:return:str
Anchor tag- Parameters:
text (
str
)
docsteady.spec module¶
Code for Test Specification Model Generation
- class docsteady.spec.Issue(*, only=None, exclude=(), many=None, context=None, load_only=(), dump_only=(), partial=None, unknown=None)¶
Bases:
Schema
- Parameters:
only (
Union
[Sequence
[str
],AbstractSet
[str
],None
], default:None
)exclude (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)many (
bool
|None
, default:None
)context (
dict
|None
, default:None
)load_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)dump_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)partial (
Union
[bool
,Sequence
[str
],AbstractSet
[str
],None
], default:None
)unknown (
str
|None
, default:None
)
- extract_fields(data, **kwargs)¶
- Parameters:
data (
dict
)kwargs (
List
[str
])
- Return type:
dict
- opts: typing.Any = <marshmallow.schema.SchemaOpts object>¶
- class docsteady.spec.TestCase(*, only=None, exclude=(), many=None, context=None, load_only=(), dump_only=(), partial=None, unknown=None)¶
Bases:
Schema
- Parameters:
only (
Union
[Sequence
[str
],AbstractSet
[str
],None
], default:None
)exclude (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)many (
bool
|None
, default:None
)context (
dict
|None
, default:None
)load_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)dump_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)partial (
Union
[bool
,Sequence
[str
],AbstractSet
[str
],None
], default:None
)unknown (
str
|None
, default:None
)
- extract_custom_fields(data, **kwargs)¶
- Parameters:
data (
dict
)kwargs (
List
[str
])
- Return type:
dict
- opts: typing.Any = <marshmallow.schema.SchemaOpts object>¶
- postprocess(data, **kwargs)¶
- Parameters:
data (
dict
)kwargs (
List
[str
])
- Return type:
dict
- process_req_links(links)¶
- Parameters:
links (
dict
)- Return type:
list
|None
- process_steps(test_script)¶
- Parameters:
test_script (
dict
)- Return type:
list
[dict
] |None
- class docsteady.spec.TestStep(*, only=None, exclude=(), many=None, context=None, load_only=(), dump_only=(), partial=None, unknown=None)¶
Bases:
Schema
- Parameters:
only (
Union
[Sequence
[str
],AbstractSet
[str
],None
], default:None
)exclude (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)many (
bool
|None
, default:None
)context (
dict
|None
, default:None
)load_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)dump_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)partial (
Union
[bool
,Sequence
[str
],AbstractSet
[str
],None
], default:None
)unknown (
str
|None
, default:None
)
- extract_custom_fields(data, **kwargs)¶
- Parameters:
data (
dict
)kwargs (
List
[str
])
- Return type:
dict
- opts: typing.Any = <marshmallow.schema.SchemaOpts object>¶
- docsteady.spec.build_spec_model(folder)¶
- Parameters:
folder (
str
)- Return type:
tuple
[dict
,dict
,dict
]
- docsteady.spec.get_lvv_details(key)¶
Get LVV information from Jira
- Parameters:
key (
str
) –str
LVV jira Key- Return type:
dict
- Returns:
lvv a dictionary The LVV information that is not available in the test case. In a first stage, the only information required are the High Level Requirements
docsteady.tplan module¶
Code for Test Report (Run) Model Generation
- class docsteady.tplan.TestPlan(*, only=None, exclude=(), many=None, context=None, load_only=(), dump_only=(), partial=None, unknown=None)¶
Bases:
Schema
- Parameters:
only (
Union
[Sequence
[str
],AbstractSet
[str
],None
], default:None
)exclude (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)many (
bool
|None
, default:None
)context (
dict
|None
, default:None
)load_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)dump_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)partial (
Union
[bool
,Sequence
[str
],AbstractSet
[str
],None
], default:None
)unknown (
str
|None
, default:None
)
- opts: typing.Any = <marshmallow.schema.SchemaOpts object>¶
- preprocess_plan(data, **kwargs)¶
During pre_load, we modify the input dictionary to make it look like extra data was in the request information. This means that we “pull up” custom fields in from the
customFields
dict, and we also, for the test plan, extract milestone information from the folder information.Marshmallow will see the modified input dictionary and use the schema definition appropriately.
- Parameters:
data (
dict
)kwargs (
List
[str
])
- Return type:
dict
- docsteady.tplan.build_tpr_model(tplan_key)¶
- Parameters:
tplan_key (
str
)- Return type:
dict
- docsteady.tplan.filter_notexecuted_nocomment(testresults_map)¶
- Parameters:
testresults_map (
dict
)- Return type:
None
- docsteady.tplan.labelResults(result)¶
- Parameters:
result (
dict
)- Return type:
None
- docsteady.tplan.render_report(metadata, target, plan_dict, format, path=None)¶
- Parameters:
metadata (
dict
)target (
str
)plan_dict (
dict
)format (
str
)path (
str
|None
, default:None
)
- Return type:
Environment
docsteady.utils module¶
Code for Test Specification Model Generation
- class docsteady.utils.HtmlPandocField(*, load_default=<marshmallow.missing>, missing=<marshmallow.missing>, dump_default=<marshmallow.missing>, default=<marshmallow.missing>, data_key=None, attribute=None, validate=None, required=False, allow_none=None, load_only=False, dump_only=False, error_messages=None, metadata=None, **additional_metadata)¶
Bases:
String
A field that originates as HTML but is normalized to a template language.
- Parameters:
load_default (
Any
, default:<marshmallow.missing>
)missing (
Any
, default:<marshmallow.missing>
)dump_default (
Any
, default:<marshmallow.missing>
)default (
Any
, default:<marshmallow.missing>
)data_key (
str
|None
, default:None
)attribute (
str
|None
, default:None
)validate (
Union
[Callable
[[Any
],Any
],Iterable
[Callable
[[Any
],Any
]],None
], default:None
)required (
bool
, default:False
)allow_none (
bool
|None
, default:None
)load_only (
bool
, default:False
)dump_only (
bool
, default:False
)error_messages (
dict
[str
,str
] |None
, default:None
)metadata (
Optional
[Mapping
[str
,Any
]], default:None
)
- class docsteady.utils.MarkdownableHtmlPandocField(*, load_default=<marshmallow.missing>, missing=<marshmallow.missing>, dump_default=<marshmallow.missing>, default=<marshmallow.missing>, data_key=None, attribute=None, validate=None, required=False, allow_none=None, load_only=False, dump_only=False, error_messages=None, metadata=None, **additional_metadata)¶
Bases:
String
An field that originates as HTML, but is intepreted as plain text (bold, italics, and font styles are ignored) if the field has a markdown comment in the beginning, of the form
[markdown]: #
- Parameters:
load_default (
Any
, default:<marshmallow.missing>
)missing (
Any
, default:<marshmallow.missing>
)dump_default (
Any
, default:<marshmallow.missing>
)default (
Any
, default:<marshmallow.missing>
)data_key (
str
|None
, default:None
)attribute (
str
|None
, default:None
)validate (
Union
[Callable
[[Any
],Any
],Iterable
[Callable
[[Any
],Any
]],None
], default:None
)required (
bool
, default:False
)allow_none (
bool
|None
, default:None
)load_only (
bool
, default:False
)dump_only (
bool
, default:False
)error_messages (
dict
[str
,str
] |None
, default:None
)metadata (
Optional
[Mapping
[str
,Any
]], default:None
)
- class docsteady.utils.SubsectionableHtmlPandocField(*args, extractable=None, **kwargs)¶
Bases:
String
A field that originates as HTML but is normalized to a template language.
- Parameters:
args (
list
[str
])extractable (
list
[Any
] |None
, default:None
)kwargs (
Any
)
- docsteady.utils.as_arrow(datestring)¶
- Parameters:
datestring (
str
)- Return type:
Arrow
This will find matching docushare handles and replace the text with the
\citeds{text}
.- Parameters:
text (
str
)- Return type:
str
- docsteady.utils.create_folders_and_files()¶
Create attachment and image folders if missing :rtype:
None
:return:
- docsteady.utils.download_and_rewrite_images(value)¶
- Parameters:
value (
str
)- Return type:
str
- docsteady.utils.download_attachments(adict)¶
download the :type adict:
dict
:param adict: the thing containing links :rtype:list
[dict
[str
,str
]] :return: none
- docsteady.utils.fix_json(json)¶
Seems some nulls are in the Jason instead of None .. marshmallow is not happy
- Parameters:
json (
dict
)- Return type:
dict
- docsteady.utils.get_execs(cycleId)¶
get execs for a given cycleId and cache them return the executions for this cycle
- Parameters:
cycleId (
str
)- Return type:
List
[dict
]
- docsteady.utils.get_folders(target_folder)¶
Get all folders that have the target folder in their string
- Parameters:
target_folder (
str
)- Return type:
list
[str
]
- docsteady.utils.get_id(pointer, key='id')¶
- Parameters:
pointer (
dict
)key (
str
, default:'id'
)
- Return type:
str
- docsteady.utils.get_key(pointer, key='self')¶
the self in some poinnters has the KEY embeded ..
- Parameters:
pointer (
dict
)key (
str
, default:'self'
)
- Return type:
str
- docsteady.utils.get_rest_session()¶
Requires JIRA_USER and JIRA_PASSWORD to be in the config
- Return type:
Session
- docsteady.utils.get_tc_executions(params)¶
TestExecution call is paged - the parameters allow specification of testCase or Cycle which are the two ways we access executions. This gets the results and caches them
- Parameters:
params (
dict
)- Return type:
list
[dict
]
- docsteady.utils.get_testcase_executions(testCaseId)¶
Get all the test executions and cache them - can not get per cycle from the API.
- Parameters:
testCaseId (
str
)- Return type:
list
[dict
]
- docsteady.utils.get_teststeps(id, burl='testcases/{}/teststeps')¶
get all the test steps from the paginated url call
- Parameters:
id (
str
)burl (
str
, default:'testcases/{}/teststeps'
)
- Return type:
List
[dict
]
- docsteady.utils.get_tspec(folder)¶
- Parameters:
folder (
str
)- Return type:
str
- docsteady.utils.get_value(pointer, key='self')¶
Given a dict there is a pointer in it which resolves to a name follow it and cache it. Sometimes zephyr returns a regular Jira api call, those are not authorized by the zephy token they require a regular JIRA session
- Parameters:
pointer (
dict
|str
)key (
str
, default:'self'
)
- Return type:
str
- docsteady.utils.get_via_zephyr(url)¶
Zephyr has a bunch of relative urls BUT frequntely returns FULL urls so temporarily store the base URL get the full url restore the base url.
The Zephyr response is a json dict of the values returned from the url call.
- Parameters:
url (
str
)- Return type:
dict
- docsteady.utils.get_zephy_image(img_url)¶
- Parameters:
img_url (
str
)- Return type:
Response
- docsteady.utils.get_zephyr()¶
Requires token to be in the config
- Return type:
ZephyrScale
- docsteady.utils.get_zephyr_api()¶
- Return type:
CloudApiWrapper
- docsteady.utils.owner_for_id(owner_id)¶
- Parameters:
owner_id (
str
|dict
)- Return type:
str
- docsteady.utils.process_links(links, item)¶
Zephy returns a Dict of dicts for related links If it is a value use it if its a http pointer follow it .. links is assumed to be a dict of differnt tytpes of links item is the type like ‘issues’
- Parameters:
links (
dict
)item (
str
)
- Return type:
List
- docsteady.utils.rewrite_strong_to_subsection(content, extractable)¶
Extract specific “strong” elements and rewrite them to headings so they appear as subsections in Latex :type extractable:
list
:param extractable: List of names that are extractable :type content:str
:param content: HTML to parse :rtype:str
:return: New HTML
- docsteady.utils.t_case_for_key(test_case_key)¶
This will return a cached testcases (a test case already processed) or fetch it if and add to cache. Named t_case to not clash with test in pytest. Not sure why tox causes a problem with this (not pytest).: :type test_case_key:
str
:param test_case_key: Key of test case to fetch :rtype:dict
[str
,Any
] :return: Cached or fetched test case.
docsteady.vcd module¶
Code for VCD
- class docsteady.vcd.Coverage_Count¶
Bases:
object
Coverage for Requirements and Verification Elements
- failedtcs = 0¶
- noexectcs = 0¶
- notcs = 0¶
- passedtcs = 0¶
- passedtcs_label = 'sec:passedtcs'¶
- passedtcs_name = 'Passed TCs'¶
- total_count()¶
- Return type:
int
- class docsteady.vcd.VerificationE(*, only=None, exclude=(), many=None, context=None, load_only=(), dump_only=(), partial=None, unknown=None)¶
Bases:
Schema
- Parameters:
only (
Union
[Sequence
[str
],AbstractSet
[str
],None
], default:None
)exclude (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)many (
bool
|None
, default:None
)context (
dict
|None
, default:None
)load_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)dump_only (
Union
[Sequence
[str
],AbstractSet
[str
]], default:()
)partial (
Union
[bool
,Sequence
[str
],AbstractSet
[str
],None
], default:None
)unknown (
str
|None
, default:None
)
- extract_fields(data, **kwargs)¶
- Parameters:
data (
dict
)kwargs (
List
[str
])
- Return type:
dict
- extract_verified_by(data_fields)¶
- Parameters:
data_fields (
dict
)- Return type:
dict
- opts: typing.Any = <marshmallow.schema.SchemaOpts object>¶
- docsteady.vcd.build_vcd_dict(ve_model, usedump=False, path='./')¶
Build the VCD model. Use json files to store data extracted from jira so they can be reused in the next run (assuming no need to get fresh infor from jira). Possibly dumo is most usefull in testing
- Parameters:
ve_model (
dict
)usedump (
bool
, default:False
)path (
str
, default:'./'
)
- Return type:
list
- docsteady.vcd.do_req_coverage(ves, ve_coverage)¶
Calculate the coverage level of a requirement based on the downstram verification elements. :param myvreq: version requirement name :type ves:
list
:param ves: :type ve_coverage:dict
:param ve_coverage: :rtype:str
:return:
- docsteady.vcd.do_ve_coverage(tcs, results)¶
- Parameters:
tcs (
dict
) – test cases resultsresults (
dict
)
- Return type:
str
- Returns:
coverage
- docsteady.vcd.find_vekey(reqname, ve_keys)¶
Look through the keys until we find the one my requirment starts with
- Parameters:
reqname (
str
)ve_keys (
list
[str
])
- Return type:
str
|None
- docsteady.vcd.runstatus(trs)¶
- Parameters:
trs (
str
)- Return type:
str
- docsteady.vcd.summary(dictionary)¶
generate and print summary information
- Parameters:
dictionary (
list
)- Return type:
list
[dict
|Any
]
docsteady.ve_baseline module¶
Subroutines required to baseline the Verification Elements
- docsteady.ve_baseline.do_ve_model(component, subcomponent, DOFEW=False)¶
Extract VE model information from Jira, Zephyr :type component:
str
:param component: :type subcomponent:str
:param subcomponent: :type DOFEW:bool
, default:False
:param DOFEW: mainly for testing - jsut get some VEs not all :rtype:dict
:return:
- docsteady.ve_baseline.extract_ves(cmp, subcmp, DOFEW=False)¶
- Parameters:
cmp (
str
)subcmp (
str
)DOFEW (
bool
, default:False
)
- Return type:
dict
- Returns:
- docsteady.ve_baseline.get_testcase(tckey)¶
Get test case details from Jira :param rs: :type tckey:
str
:param tckey: :rtype:dict
|None
:return:
- docsteady.ve_baseline.get_testcases_ve(key)¶
VE key form LVV-NNN
- Parameters:
key (
str
)- Return type:
list
[str
]
- docsteady.ve_baseline.get_ve_details(rs, key)¶
Get Verification Element details from Jira :type rs:
Session
:param rs: :type key:str
:param key: :rtype:dict
:return:
- docsteady.ve_baseline.get_ve_json(jve_res)¶
- Parameters:
jve_res (
dict
)- Return type:
dict
- docsteady.ve_baseline.process_test_cases(tcs, ve_details)¶
- Parameters:
tcs (
list
[str
])ve_details (
dict
)
- Return type:
dict