<commit_before>import sys
import os
import subprocess
import requests
import hashlib


def parse_and_run_feature_file():
    FEATURE_FILE = sys.argv[1]
    collect_result = False
    test_suite_failed = False
    
    with open(FEATURE_FILE, 'r') as fd:
        feature_file = fd.read().split("\n")

    for line in feature_file:
        if "@contract=" in line:
            _, _, contract_name = line.split("=")
            res = requests.get(f"http://localhost:8090/init", params={"__contract__script__": contract_name})
            assert res
            collect_result = True

        if "Scenario:" in line:
            _, scenario = line.split(":")
            scenario = scenario.strip()
            
            os.system("./steps &")
            print(f"RUNNING SCENARIO {scenario}")

            res = subprocess.run(["cucumber", "features", "-n", scenario, "-f", "junit", "-o", f'results/{hashlib.sha256(scenario.encode()).hexdigest()}'])
            
            if res.returncode:<commit_msg>fix: Script for running Acceptance Tests, (#112)<commit_after>import sys
import os
import subprocess
import requests
import hashlib


def parse_and_run_feature_file():
    FEATURE_FILE = sys.argv[1]
    collect_result = False
    test_suite_failed = False
    
    with open(FEATURE_FILE, 'r') as fd:
        feature_file = fd.read().split("\n")

    for line in feature_file:
        if "@contract=" in line:
            _, contract_name = line.split("=")
            res = requests.get(f"http://localhost:8090/init", params={"__contract__script__": contract_name})
            assert res
            collect_result = True

        if "Scenario:" in line:
            _, scenario = line.split(":")
            scenario = scenario.strip()
            
            os.system("./steps &")
            print(f"RUNNING SCENARIO {scenario}")

            res = subprocess.run(["cucumber", "features", "-n", scenario, "-f", "junit", "-o", f'results/{hashlib.sha256(scenario.encode()).hexdigest()}'])
            
            if res.returncode:
{'fraction_non_alphanumeric': 0.13516160626836435, 'fraction_numerical': 0.00930460333006856, 'mean_word_length': 2.3491803278688526, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5071819', 'n_tokens_mistral': 610, 'n_tokens_neox': 599, 'n_words': 137}