cbeck's avatar
cbeck
Senior Member
4 years ago
Status:
New Idea

Impact Analysis: Find Usage of Keyword Test

In order to identify impacts when changing a keyword script, it would be useful to find what keyword tests use other keyword tests.

 

Example: I have keyword test A and it is used in keyword tests 1, 2, & 3.  I'd like to be able to right click keyword test A in the Project Explorer pane and be presented with "Find Usage".  Clicking that would result in a list showing keyword tests 1, 2, & 3.

  • cbeck's avatar
    cbeck
    Senior Member

    I found another feature request where cunderw provided a script which seems to work for finding usage within a project - https://community.smartbear.com/t5/TestComplete-Feature-Requests/Variables-Find-Unused-show-where-used/idi-p/132393

     

    It's a powershell script outside of TestComplete but is still helpful.

    write-host "This script searches all TestComplete Script and Key Word Test files for specified Search String"
    $searchString = Read-Host "Enter the string to search for: "
    if ($PSVersionTable.PSVersion.Major -LT 3) 
    {
        get-childitem -include *.tcKDTest, *.sj -path <path to test repository> -recurse | select-string -pattern $searchString |  select filename, path, line -unique | out-gridview
        read-host "Press enter to continue..."
    }
    ELse
      {
         get-childitem -include *.tcKDTest, *.sj -path <path to test repository> -recurse | select-string -pattern $searchString |  select filename, path, line -unique | out-GridView -passthru | ForEach-Object {start "C:\Program Files (x86)\Notepad++\notepad++.exe" $_.Path}
       }
  • scottroutesmart's avatar
    scottroutesmart
    Occasional Contributor

    Any status update on getting this Find Usages of Keyword Test added to the core TestComplete product? 

    It took me a long time to even find this post, so I assume many other people have searched for this feature request but have not been able to locate it too.