Public Member Functions | |
def | __init__ |
def | complete_test |
def | csv_filename |
def | get_active_str |
def | get_cum_time |
def | get_elapsed |
def | get_elapsed_str |
def | load_attachments |
def | make_email_message |
def | make_html_test_summary |
def | notify_operator |
def | result |
def | set_bay |
def | test_complete |
def | update |
def | update_invent |
def | write_log |
def | write_tar_file |
Public Attributes | |
log_file | |
Private Member Functions | |
def | _check_invent_hours |
def | _email_subject |
def | _get_test_team |
def | _get_total_hours |
def | _load_attachments |
def | _make_test_info_table |
def | _write_csv_entry |
def | _write_summary_log |
def | _write_table |
Private Attributes | |
_bay | |
_cum_data | |
_cum_seconds | |
_has_checked_invent | |
_invent_hrs_base | |
_invent_note_id | |
_last_invent_time | |
_last_log_time | |
_last_msg | |
_last_update_time | |
_log_entries | |
_num_events | |
_num_halts | |
_send_email | |
_serial | |
_start_time | |
_test | |
_test_complete | |
_was_launched | |
_was_running |
Updates CSV record with state changes for a test
Definition at line 156 of file test_record.py.
def life_test.test_record.TestRecord.__init__ | ( | self, | |
test, | |||
serial, | |||
file_path = None , |
|||
csv_name = None , |
|||
send_email = True |
|||
) |
@param test LifeTest : Test type, params @param serial str : Serial number of DUT @param file_path str : File path of out. Used for unit testing.
Definition at line 161 of file test_record.py.
def life_test.test_record.TestRecord._check_invent_hours | ( | self, | |
iv | |||
) | [private] |
Checks Invent for the number of hours that the test has run, from Invent. Invent stores this data as a Key-Value for the item. Updates self._invent_hrs_base with data
Definition at line 587 of file test_record.py.
def life_test.test_record.TestRecord._email_subject | ( | self, | |
lvl, | |||
msg | |||
) | [private] |
Definition at line 341 of file test_record.py.
def life_test.test_record.TestRecord._get_test_team | ( | self | ) | [private] |
Definition at line 334 of file test_record.py.
def life_test.test_record.TestRecord._get_total_hours | ( | self, | |
iv | |||
) | [private] |
Returns string of total hours that this device has run under this test. Hours from previous tests are pulled from Invent. \return str : Hours, to 0.1 hour precision. Ex: "10.2"
Definition at line 659 of file test_record.py.
def life_test.test_record.TestRecord._load_attachments | ( | self, | |
iv | |||
) | [private] |
Load attachments to Invent @raise Exception : Exception from Invent @return bool : True if loaded successfully
Definition at line 611 of file test_record.py.
def life_test.test_record.TestRecord._make_test_info_table | ( | self | ) | [private] |
Writes HTML table of test info @return str : HTML table
Definition at line 471 of file test_record.py.
def life_test.test_record.TestRecord._write_csv_entry | ( | self, | |
entry | |||
) | [private] |
Writes data to CSV, and to log entries
Definition at line 321 of file test_record.py.
def life_test.test_record.TestRecord._write_summary_log | ( | self | ) | [private] |
Writes HTML table of test events and messages @return str : HTML table
Definition at line 512 of file test_record.py.
def life_test.test_record.TestRecord._write_table | ( | self | ) | [private] |
Writes HTML table of last state of test @return str : HTML table
Definition at line 492 of file test_record.py.
def life_test.test_record.TestRecord.complete_test | ( | self | ) |
Test is marked as finished.
Definition at line 390 of file test_record.py.
def life_test.test_record.TestRecord.csv_filename | ( | self | ) |
Definition at line 331 of file test_record.py.
def life_test.test_record.TestRecord.get_active_str | ( | self | ) |
Definition at line 239 of file test_record.py.
def life_test.test_record.TestRecord.get_cum_time | ( | self | ) |
Time that test has been running, in seconds.
Definition at line 233 of file test_record.py.
def life_test.test_record.TestRecord.get_elapsed | ( | self | ) |
Time since test was started, in seconds.
Definition at line 226 of file test_record.py.
def life_test.test_record.TestRecord.get_elapsed_str | ( | self | ) |
Definition at line 242 of file test_record.py.
def life_test.test_record.TestRecord.load_attachments | ( | self, | |
iv | |||
) |
Load attachment into inventory system as a tarfile Loads data as "test". @param iv Invent : Invent client, to load @return bool : True if loaded successfully
Definition at line 639 of file test_record.py.
def life_test.test_record.TestRecord.make_email_message | ( | self, | |
level, | |||
alert_msg = '' |
|||
) |
Called during unit testing and operator notificaton
Definition at line 344 of file test_record.py.
def life_test.test_record.TestRecord.make_html_test_summary | ( | self, | |
alert_msg = None |
|||
) |
Definition at line 416 of file test_record.py.
def life_test.test_record.TestRecord.notify_operator | ( | self, | |
lvl, | |||
alert_msg | |||
) |
Sends email with test info to testing team
Definition at line 369 of file test_record.py.
def life_test.test_record.TestRecord.result | ( | self | ) |
Definition at line 583 of file test_record.py.
def life_test.test_record.TestRecord.set_bay | ( | self, | |
bay | |||
) |
The bay the test runs on. Can only be called when test isn't launched.
Definition at line 398 of file test_record.py.
def life_test.test_record.TestRecord.test_complete | ( | self | ) |
Definition at line 395 of file test_record.py.
def life_test.test_record.TestRecord.update | ( | self, | |
launched, | |||
running, | |||
stale, | |||
note, | |||
monitor_msg | |||
) |
Updates test record with current state Looks at current, previous state to record data and send alerts \param launched bool : Test launched \param running bool : Running (status OK) \param stale bool : Test is stale \param note str : Notes from operator \param monitor_msg str : Message from Test Monitor \return (int, str) : int [0:OK, 1:Notify, 2:Alert]
Definition at line 245 of file test_record.py.
def life_test.test_record.TestRecord.update_invent | ( | self, | |
iv | |||
) |
Update inventory system note with status, and update Key-Value with cumulative hours. @param iv Invent : Invent client, to load note
Definition at line 670 of file test_record.py.
def life_test.test_record.TestRecord.write_log | ( | self | ) |
Writes full log to HTML table form @return str : Log of test
Definition at line 536 of file test_record.py.
def life_test.test_record.TestRecord.write_tar_file | ( | self | ) |
Writes CSV, HTML summary into tar file. Unit testing and loading attachments ##\return Named temporary file. ".close()" will delete file
Definition at line 555 of file test_record.py.
life_test::test_record.TestRecord::_bay [private] |
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
life_test::test_record.TestRecord::_test [private] |
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.
Definition at line 165 of file test_record.py.