Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

CTP : Mapping Javascript methods to xml field in CTP

bsaikrishna84
bsaikrishna84 Posts: 66
edited March 2020 in CTP

I have tst file loaded to CTP. All the test scripts have a field which is linked to a javascript file to get unique value. However, when i ran the tst in CTP, scripts are failing because javascript file is missing.
I have added javascript file to CTP, but now am not sure how do I call / map the methods to test scripts in CTP.

Comments

  • Matt Love
    Matt Love Posts: 97 admin

    Make sure that the tst file references the javascript file using a relative path to the "TestAssets" project in the workspace instead of an absolute path like C:\user\folder. All files uploaded in CTP's API Testing page will implicitly be contained in a "TestAssets" project. If you are using sub-folders in your workspace, recreate the same sub-folder structure in CTP before uploading. Upload both the tst file and the javascript file to their corresponding folders and then try executing the tst. CTP does not allow modifying the path to the javascript file inside the tst, so that path needs to be set inside SOAtest desktop as a relative path before uploading.

  • bsaikrishna84
    bsaikrishna84 Posts: 66

    I will try this. Thanks Matt