ContributionsMost RecentMost LikesSolutionsRe: Testing with text files the content if the text file is just simple text where it measures the time in seconds Re: Testing with text files i created a powershell script to log the time it takes to load the applications. for example: when user logs in, the biostime came out to be 15.756 seconds in the logged txt file. in testcomplete, i want the test to read the number in the file and create an if/else statement like: if bioslog is greater than 3 seconds fail, if less than pass. Testing with text files Hi, i was wondering if anyone has tried testing with log files. im creating a test that looks over text files and put a parameter if the logfile is less than or greater than the value put. this is the code i have so far but it keeps giving me an error with the script im making. Any thoughts or ideas on how i can make this happen? import sys import os import aq def read_text_file_and_test(file_path): try: with open(file_path, 'r') as file: if __name__ == "__main__": if len(sys.argv) != 2: print("Usage: python test_script.py <path_to_text_file>") sys.exit(1) text_file_path = sys.argv[1] if not os.path.isfile(text_file_path): print("The provided file does not exist.") sys.exit(1) read_text_file_and_test(text_file_path)