Skip to content
Snippets Groups Projects
Commit 81ca28e2 authored by Marko Mecina's avatar Marko Mecina
Browse files

fix function naming in generated automated test scripts

+ add config block for test setup
parent e8a8936a
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ def create_file_name(name):
:param str name: the name which should be transformed into a valid file name
"""
assert isinstance(name, str)
file_name = name.replace(' ', '_')
file_name = name.replace(' ', '_').replace('-', '_')
file_name = file_name.lower()
return file_name
......@@ -51,7 +51,7 @@ def create_class_name(name):
""" Take the name of the test specification and make a valid python class name out of it
:param str name: the name of the test specification"""
assert isinstance(name, str)
class_name = name.replace(' ', '')
class_name = name.replace(' ', '').replace('-', '_')
return class_name
......
......@@ -22,8 +22,8 @@
step_end_cuc = cfl.get_last_pckt_time(pool_name=pool_name, string=False)
report.command_step_end(step_param=param, step_end_cuc=step_end_cuc, step_id=step_id)
summary =self.step_verification(pool_name=pool_name, step_start_cuc=step_start_cuc, param=param, summary=summary,
ver_file=${testSpecFileName}_verification, ver_class="${testSpecClassName}Verification",
ver_func="step_${testStepNumber}", step_id=step_id)
summary = self.step_verification(pool_name=pool_name, step_start_cuc=step_start_cuc, param=param, summary=summary,
ver_file=${testSpecFileName}_verification, ver_class="${testSpecClassName}Verification",
ver_func="step_${testStepNumber}", step_id=step_id)
return summary
#!/usr/bin/env python3
# this script should provide an easy way to execute single steps of the test IASW_1_DB
# this script should provide an easy way to execute single steps of a test
import logging
import threading
import os
......@@ -27,12 +27,15 @@ import ${testSpecFileName}_verification
importlib.reload(${testSpecFileName}_command)
importlib.reload(${testSpecFileName}_verification)
# create a instance of the test and the verification
# create an instance of the test and the verification
testinstance = ${testSpecFileName}_command.${testSpecClassName}(do_verification=True)
verification_instance = ${testSpecFileName}_verification.${testSpecClassName}Verification()
# define the pool name
pool_name = 'new_tmtc_pool'
# SETUP
pool_name = 'LIVE'
save_pool = False
verify_offline = False
interactive = False
#! CCS.BREAKPOINT
# run the whole test
......@@ -40,13 +43,13 @@ threading.Thread(target=testinstance.run,
kwargs={'pool_name': pool_name},
daemon=True).start()
if False:
if save_pool:
# Save the pool to a file
threading.Thread(target=testinstance.save_pool_in_file,
kwargs={'pool_name': pool_name,
'save_pool': True},
daemon=True).start()
if False:
if verify_offline:
# do Verification of command log file and saved pool
threading.Thread(target=verification_instance.verify,
kwargs={'command_log_file':'logs_test_runs/Simple_Example_command_cmd.log',
......@@ -58,6 +61,6 @@ if False:
# Run the test step by step
#! CCS.BREAKPOINT
if False:
if interactive:
# Pre-Conditions: $TestPreconDescription
threading.Thread(target=testinstance.establish_preconditions, kwargs={'pool_name': pool_name}, daemon=True).start()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment