Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Application Program Interviews:AutoCADBEA WeblogicBioinformaticsBizTalk ServerBug Tracking ToolsBugzillaClarify CRMCoding StandardsComputer Aided Design (CAD) DesignerCVSGIMPJMXLINQLoadRunnerMagentoMATLABMicrosoft AccessMicrosoft ExcelMicrosoft OfficeMicrosoft OutlookMicrosoft WordModel View Controller (MVC)OLAPOOADQuickbookRational RobotRDFSchemaSiebelSilkTestSVGTest PlanTesting ToolsUnity 3D DeveloperVRMLWCF SDKWPFXML DOMXPointer
Copyright © 2018. All Rights Reserved
SilkTest Interview Question:
How to maintain global variable when script is run thru test plans?
Submitted by: AdministratorAnswer1:
This is the feature of Silk Test.
When u declare some global variables and initialize them in a testcase in one .t file, they are not retained to be used in another .t file in a testplan.
Here is the way out ...
Create a file and save the values in this file before u exit from the .t file.
This can be your last testcase in a file.
In the next .t file in the sequence, read this file and initialize global variables again.
This can be your first testcase in the .t file.
Answer2:
try couple of things
1. use environment variable as suggested by an other member of this group
2. copy the variable to the clipboard, every automation tool has a way to write and read content from clipboard which does not effect scope of the script.
Answer3:
I have one more solution for this problem try it out.
External file method (preferably .ini file - use ReadIni (), WriteIni () and few other functions).
Override your TestcaseEnter () and TestCaseExit () functions to get and set variable (reading values should be in called TestCaseEnter () and writing back the values in TestCaseExit ())
Even testcase failure also you will not loose the values
Submitted by: Administrator
This is the feature of Silk Test.
When u declare some global variables and initialize them in a testcase in one .t file, they are not retained to be used in another .t file in a testplan.
Here is the way out ...
Create a file and save the values in this file before u exit from the .t file.
This can be your last testcase in a file.
In the next .t file in the sequence, read this file and initialize global variables again.
This can be your first testcase in the .t file.
Answer2:
try couple of things
1. use environment variable as suggested by an other member of this group
2. copy the variable to the clipboard, every automation tool has a way to write and read content from clipboard which does not effect scope of the script.
Answer3:
I have one more solution for this problem try it out.
External file method (preferably .ini file - use ReadIni (), WriteIni () and few other functions).
Override your TestcaseEnter () and TestCaseExit () functions to get and set variable (reading values should be in called TestCaseEnter () and writing back the values in TestCaseExit ())
Even testcase failure also you will not loose the values
Submitted by: Administrator
Copyright 2007-2025 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.