Forum Discussion
4 Replies
- djadhavRegular Contributor
What language you are using for scripting? Please give an example of the content of the documentation you would like to create.
- maxtesterContributor
I am using JScript and looking for a method that lists all functions that are within a script. Something like this:
script foo.sj
- function test1(param 1)
- function test 2()
- .....
script foo2.sj
- ....
and so on. Something like javadoc in eclipse
- djadhavRegular Contributor
Here is a simple way to do it with Powershell. Open Powershell with Administrator privileges (Right click and select 'Run as Administrator')
Command
Select-String -Path "C:\TC11Projects\abc\scripts\*.svb" -Pattern ^[ \t]*function
Explanation:
"C:\TC11Projects\abc\scripts\*.svb" - Folder where the script files are. *.svb identifies the files to be scanned.
^[ \t]*function - regular expression that specifies 'All lines that have function as the first word preceded by 0 or more spaces or tabs'
This will give you an output like this:
TC11Projects\abc\scripts\ManageAccess.svb:34: FUNCTION Init()
TC11Projects\abc\scripts\ManageAccess.svb:43: FUNCTION Goto_HomePage
TC11Projects\abc\scripts\CommonActions.svb:43: FUNCTION LogOut- maxtesterContributor
I have already imlemented such parser which gives me each function in each script, parameters, my descritpion and so on. It works fine for me. But I am also looking for such a in TC function and I am wondered that t does not exist
Related Content
Recent Discussions
- 3 days agovladd1