this is the so called "data driven test" you are explaining off, isn't it?
this is one of my next topics to start with... |
Not really, no. In the case of the app, what makes the app do anything is in the data. So, if I want a new message to be sent, I need to actually insert data into the SQL database in a format that the app is expecting. If I want message type A to send, I need to manipulate the data in the SQL so that the app that monitors that data then processes accordingly. If my next test is to send message type B, I again need to manipulate the data. There is no "on screen" UI to make those changes so I need to do them in SQL directly.
As another example, while DBTables checkpoints are good, there's a limitation to them. Let's say I'm working against a database that I need to make sure of certain values being stored properly, one being the date that the data was entered. Well, if I run the script today, that date will be today's date. If I run it tomorrow, that date will be tomorrow's date. There's no way to set up a DBTable checkpoint to tell it to use a regular expression to validate to make sure that the date in that column is today's date. For that purpose, I have to write custom SQL queries and do comparisons that way with regular expressions or other methods to make sure the date is being properly stored. DBTable check points work great with both keyword tests and scripts, but writing those custom SQL queries and custom comparison code is much easier done in script than in a Keyword Test.
however, i wished that the relation between script and keywordtest would be the same like Delphi's DFM(GUI) and it's unit.
changing the DFM per dragging components on the form would change the source-code that i can change manually too. |
THAT would be cool as well. However, what if I change the code behind the scenes in such a way that the KWT does not support or does not translate into KWT operations? Right now, KWT functionality, while very good and useful for certain situations, is not script code and, as far as I can tell, is not intended to be. If you need to write script code, you write script code and then you can call those routines within a keyword test if you need to.
I like the suggestion and perhaps SmartBear can do something on those lines, but I'm not sure how without doing a lot more expansion of KWT that would probably go counter to their selling point, that being a nice way for non-developer/non-scripting automaters to be able to create automated tests quickly and easily.