def run(scenario):
    keywords = ["Given", "When", "Then", "And", "But"]
    for line in scenario.split("\n"):
        for key, value in variables.items():
            line = line.replace("{" + key + "}", str(value))
        for keyword in keywords:
            line = line.replace(keyword, "")
        line = line.strip()
        if not line:
            continue
        match = None
        for definition, callback in definitions.items():
            match = re.search("^" + definition + "$", line)
            if match:
                try:
                    callback(*match.groups())
                except AssertionError as e:
                    assert False, f"Failed: {line}, with error: {e}"
                break
        if not match:
            assert False, f"Definition not implemented: {line}"
    return True