hitl_tester.test_cases.test_template
This file is meant to illustrate the format of a test script.
(c) 2020-2024 TurnAround Factor, Inc.
#
CUI DISTRIBUTION CONTROL
Controlled by: DLA J68 R&D SBIP
CUI Category: Small Business Research and Technology
Distribution/Dissemination Controls: PROTECTED BY SBIR DATA RIGHTS
POC: GOV SBIP Program Manager Denise Price, 571-767-0111
Distribution authorized to U.S. Government Agencies only, to protect information not owned by the
U.S. Government and protected by a contractor’s ‘limited rights’ statement, or received with the understanding that
it is not routinely transmitted outside the U.S. Government (determination made September 14, 2024). Other requests
for this document shall be referred to ACOR DLA Logistics Operations (J-68), 8725 John J. Kingman Rd., Suite 4317,
Fort Belvoir, VA 22060-6221
#
SBIR DATA RIGHTS
Contract No.:SP4701-23-C-0083
Contractor Name: TurnAround Factor, Inc.
Contractor Address: 10365 Wood Park Ct. Suite 313 / Ashland, VA 23005
Expiration of SBIR Data Rights Period: September 24, 2029
The Government's rights to use, modify, reproduce, release, perform, display, or disclose technical data or computer
software marked with this legend are restricted during the period shown as provided in paragraph (b)(4) of the Rights
in Noncommercial Technical Data and Computer Software--Small Business Innovative Research (SBIR) Program clause
contained in the above identified contract. No restrictions apply after the expiration date shown above. Any
reproduction of technical data, computer software, or portions thereof marked with this legend must also reproduce
the markings.
Used in these test plans:
- firmware_validator ⠀⠀⠀(bms/firmware_validator.plan)
- firmware_validator ⠀⠀⠀(bms/firmware_validator.plan)
- firmware_validator ⠀⠀⠀(bms/firmware_validator.plan)
- template_test ⠀⠀⠀(test_plans/template_test.plan)
- template_test ⠀⠀⠀(test_plans/template_test.plan)
- template_test ⠀⠀⠀(test_plans/template_test.plan)
Example Command (warning: test plan may run other test cases):
./hitl_tester.py firmware_validator
1""" 2This file is meant to illustrate the format of a test script. 3 4# (c) 2020-2024 TurnAround Factor, Inc. 5# 6# CUI DISTRIBUTION CONTROL 7# Controlled by: DLA J68 R&D SBIP 8# CUI Category: Small Business Research and Technology 9# Distribution/Dissemination Controls: PROTECTED BY SBIR DATA RIGHTS 10# POC: GOV SBIP Program Manager Denise Price, 571-767-0111 11# Distribution authorized to U.S. Government Agencies only, to protect information not owned by the 12# U.S. Government and protected by a contractor’s ‘limited rights’ statement, or received with the understanding that 13# it is not routinely transmitted outside the U.S. Government (determination made September 14, 2024). Other requests 14# for this document shall be referred to ACOR DLA Logistics Operations (J-68), 8725 John J. Kingman Rd., Suite 4317, 15# Fort Belvoir, VA 22060-6221 16# 17# SBIR DATA RIGHTS 18# Contract No.:SP4701-23-C-0083 19# Contractor Name: TurnAround Factor, Inc. 20# Contractor Address: 10365 Wood Park Ct. Suite 313 / Ashland, VA 23005 21# Expiration of SBIR Data Rights Period: September 24, 2029 22# The Government's rights to use, modify, reproduce, release, perform, display, or disclose technical data or computer 23# software marked with this legend are restricted during the period shown as provided in paragraph (b)(4) of the Rights 24# in Noncommercial Technical Data and Computer Software--Small Business Innovative Research (SBIR) Program clause 25# contained in the above identified contract. No restrictions apply after the expiration date shown above. Any 26# reproduction of technical data, computer software, or portions thereof marked with this legend must also reproduce 27# the markings. 28""" 29 30# Import any required modules 31from hitl_tester.modules.logger import logger 32 33# The remainder of this script will contain the test cases that are to be executed. 34# NOTE: ALL OF THE TEST CASES IN THIS SCRIPT WILL BE EXECUTED. 35# The name of the functions should be more descriptive than what is illustrated below. 36 37 38def test_case_1(): 39 """Example case 1.""" 40 # in this simple test case we are going to test an assertion 41 measurement = 20 42 logger.write_info_to_report(f"Measurement was {measurement}") 43 assert measurement > 10, "Measurement out of range." 44 logger.write_info_to_report("Passed") 45 46 47def test_case_2(): 48 """Example case 2.""" 49 measurement = 20 50 logger.write_info_to_report(f"Measurement was {measurement}") 51 assert measurement <= 10, "Measurement out of range."
def
test_case_1():
39def test_case_1(): 40 """Example case 1.""" 41 # in this simple test case we are going to test an assertion 42 measurement = 20 43 logger.write_info_to_report(f"Measurement was {measurement}") 44 assert measurement > 10, "Measurement out of range." 45 logger.write_info_to_report("Passed")
Example case 1.
def
test_case_2():
48def test_case_2(): 49 """Example case 2.""" 50 measurement = 20 51 logger.write_info_to_report(f"Measurement was {measurement}") 52 assert measurement <= 10, "Measurement out of range."
Example case 2.