TabbySet is a kit of simple tools for working with all business processes around the exactpro model.
You can install TabbySet using pip:
pip install tabbysetIn general, when you want to write a new script, you should start with the following code:
import tabbyset as tbstbs variable will provide you with all the necessary tools for working with the proprietary tests.
Here are some utilities:
tbs.Folder- a class for working with folderstbs.TestCase- model representing the Exactpro proprietary test casetbs.Csv1Reader,tbs.Csv1Writer- classes for reading and writing test cases from/to CSV1 filestbs.Csv2Reader,tbs.Csv2Writer- classes for reading and writing test cases from/to CSV2 filestbs.floor_to_tick,tbs.ceil_to_tick,tbs.round_to_tick- functions for rounding prices to the nearest tick
import tabbyset as tbs
src_folder = tbs.Folder.mount_from_current_module('./path/to/folder')
output_folder = tbs.Folder.mount_from_current_module('./path/to/output/folder')
# Get list of all files in the folder
files = src_folder.listdir()
# You might want to sort the files
files.sort()
for file in files:
test_script_path = src_folder.get_file_path(file)
csv1_reader = tbs.Csv1Reader(test_script_path)
csv1_writer = tbs.Csv1Writer(output_folder.get_file_path(file))
for test_case in csv1_reader:
if {"Action": "Quote"} not in test_case.steps:
csv1_writer.write(test_case)
csv1_reader.close()
csv1_writer.close()TabbySet provides a set of instruments with the same interface as the ones already present in the business processes, but with tested functionality under the hood and/or faster.
TabbySet provides utilities for testing compatible with the unittest module.
from tabbyset.testing import TestCaseAssertions #, ... other utilities