xenanetworks / open-automation-core

🚀 XOA framework for test execution, tester management, and data subscription.
https://docs.xenanetworks.com/projects/xoa-core
Apache License 2.0
2 stars 0 forks source link

Some problem inside step-by-step guide code #28

Closed fpfeng closed 1 year ago

fpfeng commented 1 year ago

https://docs.xenanetworks.com/projects/xoa-core/en/stable/getting_started/step_by_step.html#running-old-valkyrie-test-suite-configurations

Problem 1:

    # Convert Valkyrie test config into XOA test config and run.
    with open(TEST_CONFIG_PATH, "r") as f:
        config = json.load(f)
        await do_test(my_tester_credential, "RFC-2544", config)

I think it should be:

    # Convert Valkyrie test config into XOA test config and run.
    with open(OLD_CONFIG_FILE, "r") as f:
        await do_test(my_tester_credential, "RFC-2544", f.read()) # because we are using parse_raw() in converter

Problem 2: Rename TEST_CONFIG_PATH to XOA_CONFIG_FILE or NEW_CONFIG_FILE for against OLD_CONFIG_FILE


Problem 3: PLUGINS_PATH = BASE_PATH / "pluginlib" For 2544 and 2889 have encounter relative import problem if put pluginXXXX inside pluginlib, we should put all pluginXXXX inside root folder. But that means can not load them all at once. PLUGINS_PATH = "pluginXXXX"

leonardhyu commented 1 year ago

@fpfeng for Problem 3, should the document then be changed to: Create your project folder like:

/my_xoa_project
        |
        |- main.py
        |- old_2544_config.v2544
        |- new_2544_config.json
        |- old_2889_config.v2889
        |- new_2889_config.json
        |- /plugin2544
        |- /plugin2889

and the code example for main.py can be found in docs/source/code_example. Let me know if they are ok. thanks.

Here is the documentation, you can also check the code example from here: https://docs.xenanetworks.com/projects/xoa-core/en/hotfix_104/

fpfeng commented 1 year ago

Yes, you are right about folder structure and code example is ok.