Open APIs

 View Only
  • 1.  Unable to run CTK testing for TMF 635

    TM Forum Member
    Posted Sep 26, 2023 09:12

    I'm trying to run the CTK testing for usage management TMF 635. It starts running and is supposed to hit my API but it didn't do that and suddenly closed the PowerShell window. What should I do? 



    ------------------------------
    Chetna Tyagi
    CSG
    ------------------------------


  • 2.  RE: Unable to run CTK testing for TMF 635

    TM Forum Member
    Posted Sep 26, 2023 11:52

    Hi @Chetna Tyagi

    Have you configured your config.json file? You should make sure that the url property is pointing to your api.

    After running the ctk you should see two new result files called htmlresults.html and jsonResults.json.

    To see if the run was successfull open the html file in browser to check that there no errors.



    ------------------------------
    Victor Mari Rodriguez
    TM Forum
    ------------------------------



  • 3.  RE: Unable to run CTK testing for TMF 635

    TM Forum Member
    Posted Sep 26, 2023 12:02

    Hi @Victor Mari Rodriguez, Thank you for the prompt reply!

    Yes, I have configured my api url in the config.json file and it looks as below - 

    {
        "url": "https://jka8n2eefd.execute-api.us-east-1.amazonaws.com/live/trerest_in/api/v1/usage/getusage/",
        "headers": {
            "Accept": "application/json",
            "Content-Type": "application/json",
            "Authorization": "Bearer 1321321"
        },
        "payloads": {
            "Usage": {
                "POST": {
                    "payload": {
                        "usageSpecification": {
                            "id": "af59-b504c742900e"
                        }
                    }
                }
            },
            "UsageSpecification": {
                "POST": {
                    "payload": {
                        "name": "Voice-Usage-Specification"
                    }
                }
            }
        }
    }

    With this file, when i try to run the ctk, the powershell window is closing in an abrupt manner and no htmlresults.html and jsonResults.json files are generated.

    Is there something wrong with the config.json file?



    ------------------------------
    Chetna Tyagi
    CSG
    ------------------------------



  • 4.  RE: Unable to run CTK testing for TMF 635

    TM Forum Member
    Posted Sep 27, 2023 05:14

    Hi @Chetna Tyagi

    The config file looks fine. Confirm that the url is pointing at the root of the api. I see it ends with /v1/usage/getusage when the endpoints that are queried by the ctk are /usage and /usagespecification. 

    If Html results are not appearing there may be something wrong with the execution. To help you find errors I need to know how you are running the ctk.



    ------------------------------
    Victor Mari Rodriguez
    TM Forum
    ------------------------------



  • 5.  RE: Unable to run CTK testing for TMF 635

    TM Forum Member
    Posted Oct 03, 2023 05:11
    Edited by Chetna Tyagi Oct 03, 2023 05:11

    Hi @Victor Mari Rodriguez,

    Yes, the url is pointing at the root of the api as I am able to get a response when I trigger the same endpoint via Postman. Regarding the endpoint ending with /v1/usage/getusage, I can try to change the same as expected by ctk. But even if the endpoint is not as per ctk expectation in that case also shouldn't the htmlresults.html and jsonResults.json files get generated? Is that the right expectation?

    Regarding the steps, I have downloaded the ctk zip file for TMF 635 and executing the exact steps as specified in the below link for Windows - https://projects.tmforum.org/wiki/display/API/Open+API+Conformance.



    ------------------------------
    Chetna Tyagi
    CSG
    ------------------------------