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.

Copying Suites Breaks Groovy File Path

I was trying to build a Virtual Asset from component VAs. However, when copying responder suites, the relative file path of a groovy file used in extension tool is broken during the copying process. This is despite the fact that the "persist as relative path" option is enabled. Please advise why copying responder suite breaks the relative file path of groovy file. Thank you!

Best Answer

Answers

  • williammccusker
    williammccusker Posts: 675 ✭✭✭

    Hi,

    Could you provide a screenshot of the original tool and what the copied tool settings looks like?

    Is it changing the path from relative to absolute or is the relative path no longer finding the script file? If it's not finding the script file, is the new VA in the same directory as the original? The path is relative to the pva file so if the new file is in a different directory it might not be able to find it depending on how the original relative path was set.

  • alemayehu_bofa
    alemayehu_bofa Posts: 6

    Hi @williammccusker thank you for the reply. Please see attached. As you can see, the relative file path has been replaced by full path, and there is an error message at the lower edge of the window. Before copying, there was a relative path in place of full path, and method field was filled without error.

  • benken_parasoft
    benken_parasoft Posts: 1,313 ✭✭✭
    edited January 15

    If you move or copy a tool from one asset to another using the Virtual/Test Asset Explorer then any "file" fields are automatically adjusted so they continue to point to the same file as before. This can happen if the tool is pasted into a different asset in a different folder, for example.

    Your screenshot shows the file path still relative but pointing to something inside one of the bundles of a Virtualize WAR installation, even though your screenshot is taken with Virtualize Desktop. More detail would be needed to say exactly what happened in this case, like the location of the original asset and the original file path and where the Extension Tool was being copied that resulted in the unexpected file path.

  • alemayehu_bofa
    alemayehu_bofa Posts: 6
    edited January 15

    hi @benken_parasoft thank you for the reply...
    I forgot to mention that the copying was done via REST api call below....
    Also, please attached images of the extension tool UI from the source VA and target VA. As you can see, the path in the destination VA has been changed to full path and there is an error noting that the groovy file could not be obtained.

    **
    REST call to copy suite from a source VA to target VA:**
    POST :/soavirt/api/v6/suites/copy

    POST data:

    {

    "from": {

    "id": “<PATH>/<source VA name>.pva/Responder Suite"
    

    },

    "to": {

    "name": "<new target suite name>",
    
    "parent": {
    
      "id": “<PATH>/<target VA name>.pva/Responder Suite"
    
    }
    

    }
    }

  • williammccusker
    williammccusker Posts: 675 ✭✭✭

    Hi,

    I can reproduce what you're seeing. An idea to workaround it would be to copy that specific tool's settings after copying the entire suite.

    For a fix you would have to contact support.