Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
Is it possible to upload SilkTest files automatically to SilkCentral Test Manager?
QUESTION
How do I ensure that log files and bitmaps I create during my tests
get automatically uploaded as results to SCTM?
ANSWER
Test Manager creates a temporary result directory at the following
location..
C:\DOCUME~1\user_name\LOCALS~1\Temp\SCC_ExecServer_19124_19125\PerfProjects\
..for each execution, where each file
in this directory will be included in the result file list of that
execution result. Test Manager passes the path of that result
directory as "WorkingDir" ( Working Directory) info to
the SilkTest application. The SilkTest script would have to use
this path and place created files into this directory, in order to
have them stored in Test Manager.
It is possible to use the SilkTest
SYS_GetDir () function in order to return the working folder at the
time of execution. So if you ensure that any log files, bitmaps etc
are written to this location during the execution of the SilkTest
script, then you can be assured that the file/files created will be
uploaded to SCTM.
As an example:
[-] testcase
CreateFileAndIntoTestManager() appstate none
[ ] STRING sCurrentDir
[ ] sCurrentDir = SYS_GetDir ()
[ ] print(sCurrentDir)
[ ] //create file in the current working
directory
[ ] HANDLE hFile
[ ] hFile =
FileOpen("{sCurrentDir}\myFile.txt", FM_WRITE,
null)
[ ] FileWriteLine(hFile, "Some text")
[ ] FileClose(hFile)