Pointing to scripts from keyword tests, then using dataloops
I'm fairly new to test automation. I've been able to build successful keyword tests with data driven loops.
I'm being asked about breaking out each line in the keyword tests into scripts. Basically, a small script to interact with each control in the app under test (settext, clickbutton, etc...) I simply did the "convert to script" function in Test Complete for one control (Priority) and below you see the results.
Note how it's referencing a specific DB table variable (excel spreadsheet) that I setup in the keyword test (in the dataloop). Scroll all of the way to the right.
function set_overviewPriorityText() { Aliases.BetaGlobalDataEntry.GlobalDataEntryMainForm.radDock1.radSplitContainer3.documentContainer1.documentTabStrip1.twDocumentEntry.pnlOverview.radSplitContainer2.pnlDocumentEntry.tabMainForm.CassTabPage.Overview.txtPriority.txtPriority.wText = KeywordTests.junk.Variables.oceanPositive("txtPriority"); }
I'm hoping to have small scripts like that above for all controls in the app under test, then pull those smaller scripts into a main keyword test using the "Run Script Routine" feature. This helps maintain the "Priority" control script in a single place. If the control name changes, I update the name in one place (as an example.)
In a keyword test, I want to be able to specify the spreadsheet to use for that keyword test. Then I pull those smaller scripts into it and it know to use the spreadsheet I just defined.
I'm having a hard time explaining this and I'm not even sure this makes sense. Please feel free to ask questions or point out how my question is dumb. :) he he
Chris
Thanks for the reply, Marsha.
I ended up doing this using the keyword functionality and it works well. Small individual keyword tests for app controls that are being tested, parameters inside those small tests, and a datasheet as a variable in the big keyword test (that's made up of all the small tests.)
Works well! Finally! :)
Chris