Skip to content
generateDocumentationData.py 1.09 KiB
Newer Older
from pprint import pprint
from doc.analysis.generaterobotdata import GenerateRobotData
lopezaguilar's avatar
lopezaguilar committed
import json
from os.path import dirname, exists
from os import makedirs
    folder_test_suites = dirname(dirname(__file__))
    folder_result_path = f'{folder_test_suites}/doc/results'
    result_file = f'{folder_result_path}/result.json'
    robot_file = f'{folder_test_suites}/TP/NGSI-LD/CommonBehaviours/044_01.robot'

    # Check that the folder '/results' exists and if not, create it
    if not exists(folder_result_path):
        makedirs(folder_result_path)

    data = GenerateRobotData(robot_file=robot_file,
                             execdir=folder_test_suites)
    with open(result_file, 'w') as fp:
lopezaguilar's avatar
lopezaguilar committed
        json.dump(obj=info, indent=4, fp=fp)
lopezaguilar's avatar
lopezaguilar committed
    # data = GenerateRobotData(robot_file='../TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot',
    #                          execdir='/home/fla/Documents/workspace/bdd/ngsi-ld-test-suite')
    # data.parse_robot()
    # info = data.get_info()
    # pprint(info)