New to scripting
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
New to scripting
Hi, im fairly new to scripting. All this while i have been doing keyword tests to test my desktop application. Would anyone fill me in with the benefits of scripting over keyword testing. I find that sometimes that my keyword tests get stuck when it doesnt find something. IF i start to test by scripting , will i have lesser hassle? i have chose VB script as the language. For a screen like this (attached) how would i be able start by clicking on the link and going to the next screen and verifying that it has opened the correct screen which is Intervention Hub.
Thanks for helping.
Sudha
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I started with keyword and switched to scripting. main benifit I see is flexibility in scripting.
Developement experince in many year ago helped me in transition.
Even in scripting you will get stuck when TC can not find GUI object. will it be less hassle in scripting? no way!
anything more flexible would more complex. But in long term you will benifit in scripting such as re-usebility in codes, building your own
test frame-work and handing more complex errors...etc
there are people(even in this forum) who uses both. you may try that as well.
to start with scrpting try with simple test and build it up gradually.
always think of re-userbility while scrpting
first record script with small test you want to perform.
then make script shorter and nice (readable )and add conditions..loops etc
run it and debug...good luck!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Along with the flexibility, I found that I could decrease the wait between events for the scripts so that the test ran in almost half the time when it was script instead of keyword tests.
There's a Convert to Script feature that I found to be useful. There are a few things you still have to fix in the syntax but for us it was very close. Take a keyword test that you are familiar with and convert it to a script (you can keep both). That way you will see the structure and be sure of what it is accomplishing. You can also do that for your example. If you are clear on how to write that in a keyword test, do it that way first and then convert it. That will help you learn the scripting.
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you NisHera! Also I want to ask, for example, the function of clicking a button on a screen by uisng a script and by using keyword tests (recording the actual user's action), are they the same? Because i need to check whether or not the button works when clicked - this is user interface testing actually. Which approach is recommended?
Thanks once again.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Recording is actually not recommended at all. The user actions will be recorded by location on the screen and that is not very accurate.
You can click on a button from either a keyword test or a script by using the ClickButton function.
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
not sure keyword and script recordings are identical, but essensialy both would do same thing in the test.
I do not agree recodings are bad , recorded scripts save me time of finding which functions (eg clickbutton / clickRowIndicator )to use in which object.
...should not confused with low-level recoding wich uses screen or windows coodinates. I'm talking about normal recording.
anyway recorded stuff are to get an intial idea. beter to write u r own stuff
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ClickButton function is identical. You tell it where to click and the button is clicked.
Also,TestComplete doesn't know the difference between "normal" recording and "low-level" recording. It's just recording actions and it's very difficult to get anything other than a basic test to run properly in different circumstances. That's why many people don't recommend it for tests.
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks u everyone who replied to question. Now im much more clearer.
