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:
Expain about data driven testing using silktest
Submitted by: Administrator1) Create an .xls containing the data required in the script such as username and password for this example
2) In Silk select Workflow -> Data Driven
3) Select Data Driven Test Case (after you create your testcase) Following the wizard browsing to the .xls file containing your data when prompted. This creates the DSN automatically for you. Accept rest of defaults barring you required naming conventions
4) In you script then code your method as say for example:
[CODE]
testcase DataDrivenExample () appstate DefaultBaseState
[ ]
[ ] Browser.Maximize()
[ ]
[ ] // If the Logon page is not displayed Load it.
[-] if (!LoginPage.Exists())
[ ] Browser.LoadPage("{kProtocol}://{kWebServer}:{kPort}/logon.jsp")
[ ]
[ ] LoginPage.LoginUser (User, Password)
[ ] ApplicationHome.Exists(kPageTimeOut)
[ ] ApplicationHome.SetActive()
[CODE}
Now highlight your variable User say first and from the column drop down list on the replace pan select your UserName column(that is been linked to your spreadsheet, this is all automatically done) and select Replace button, do the same for the rest of your required data. Notice the DATA DRIVEN ASSISTANT SECTION is automatically generatign code. This is a good way to start off anyways, hope it's been of some help, simple xls sheet attached but only expremely basic one
Below is what Code migth look like after Replace is selcted
[CODE]
testcase DataDrivenExample (REC_DATALIST_DD_DataDrivenExample rData) appstate DefaultBaseState
[ ]
[ ] Browser.Maximize()
[ ]
[ ] // If the Logon page is not displayed Load it.
[-] if (!LoginPage.Exists())
[ ] Browser.LoadPage("{kProtocol}://{kWebServer}:{kPort/logon.jsp")
[ ]
[ ] LoginPage.LoginUser (rData.recSheet1_.User, rData.recSheet1_.Password)
[ ] ApplicationHome.Exists(kPageTimeOut)
[ ] ApplicationHome.SetActive()
[CODE]
Submitted by: Administrator
2) In Silk select Workflow -> Data Driven
3) Select Data Driven Test Case (after you create your testcase) Following the wizard browsing to the .xls file containing your data when prompted. This creates the DSN automatically for you. Accept rest of defaults barring you required naming conventions
4) In you script then code your method as say for example:
[CODE]
testcase DataDrivenExample () appstate DefaultBaseState
[ ]
[ ] Browser.Maximize()
[ ]
[ ] // If the Logon page is not displayed Load it.
[-] if (!LoginPage.Exists())
[ ] Browser.LoadPage("{kProtocol}://{kWebServer}:{kPort}/logon.jsp")
[ ]
[ ] LoginPage.LoginUser (User, Password)
[ ] ApplicationHome.Exists(kPageTimeOut)
[ ] ApplicationHome.SetActive()
[CODE}
Now highlight your variable User say first and from the column drop down list on the replace pan select your UserName column(that is been linked to your spreadsheet, this is all automatically done) and select Replace button, do the same for the rest of your required data. Notice the DATA DRIVEN ASSISTANT SECTION is automatically generatign code. This is a good way to start off anyways, hope it's been of some help, simple xls sheet attached but only expremely basic one
Below is what Code migth look like after Replace is selcted
[CODE]
testcase DataDrivenExample (REC_DATALIST_DD_DataDrivenExample rData) appstate DefaultBaseState
[ ]
[ ] Browser.Maximize()
[ ]
[ ] // If the Logon page is not displayed Load it.
[-] if (!LoginPage.Exists())
[ ] Browser.LoadPage("{kProtocol}://{kWebServer}:{kPort/logon.jsp")
[ ]
[ ] LoginPage.LoginUser (rData.recSheet1_.User, rData.recSheet1_.Password)
[ ] ApplicationHome.Exists(kPageTimeOut)
[ ] ApplicationHome.SetActive()
[CODE]
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.