Forum Discussion

mfoster711's avatar
mfoster711
Regular Contributor
10 years ago

Does anybody use Keyword Tests?

Do you use Keyword Tests? If so, what type of testing are you doing?



I have tried "embracing" Keyword tests several times and each time I end up getting frustrated because things just seem more complicated than doing the same task in a script. I am trying to be fair and evaluate the usefulness of Keywords tests but I just never seem to be happy with the end result. Frequently, I will end up with a Keyword test that is longer and more complex looking than the same test done in a script.



What are your experience with Keyword tests? Are there things you like about them that is much more complicated in a script?



I do like NameMapping and I am currently looking at trying to use NameMapping but from within a script. Any thoughts on that?

6 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3
    Hi - 



    We use Name Mapping and Keyword Tests with some scripts mixed in. 



    Keyword Tests are useful if anyone creating or using your tests is not comfortable with scripting.  It can also be a good intro to scripting because the Keyword Tests can be converted to scripts for comparison.  



    Having done both, I don't know that Keyword Tests make anything more complicated than it would be in a script.  It might be a matter of familiarity with the functionality available in the Keyword Tests.  I know our tests have become more sophisticated as we have gained more experience.  



    I think if you (and your group?) are comfortable with scripting, then stick with that, but if you have a mixed audience, then perhaps a mix of the two is the way to go.  
  • tpotter's avatar
    tpotter
    Occasional Contributor
    Keyword tests can be useful for anyone who isn't too familiar with scripting (as mentioned above). I think it can also be used to create a more temporary sort of test, gives you less control but is created quicker -- not prone to much UI change as far as I know. It may also be useful for creating a bug for Jira if you find your current test too long to post to jira, just create a keyword test for that segment... For the most part, I use scripts to try to handle changes to UI and for more controll
  • If you look at the samples that come with Testcomplete you will find no samples written as Keyword Tests.  You might ask yourself why that is.



    The Keyword Test scripts are not really keyword tests.  They are record-and-play scripts with some formatting to make them a little similar to real keyword tests.  You might want to research the topic a bit, and consider how strong your coding skills are.



    Large test suites and testing that requires technical complexity, such as database access, O/S actions, and access to cells in form grids, are probably better suited to scripting.  
  • My coworker and I use both scripts and keyword tests. For some things when we need more control we may record a keyword test, convert it to a script then make the fine tuning changes we need when it is a script.

    I like using name mapping and keyword tests with debugging turned on during playback so we can pause or utilize the breakpoints more effectively.

  • heidi_n's avatar
    heidi_n
    Regular Contributor
    The only reason I use keyword tests is because I do not know how to write script/code.
  • NisHera's avatar
    NisHera
    Valued Contributor
    I too started with KDT but found scripting gives more control over the tests.

    And think reusebility is high in scripting...