Forum Discussion

rhsou123's avatar
8 years ago

Keyword Driven framework & Excel

Hi all,


this is a general question and I'm sorry if this is not the correct place to ask it.


I'm using Excel for my keyword driven framework and I'm actually using one sheet for the Test cases Summary and another sheet for each test case keywords, this is working fine but if anyone else wants to read the Excel sheet where the keywords of a Test case x are specified, he will not understand it correctly without going back to the Test case summary.


Also, sometimes, if I have a modification in the used keywords I forget to modify the test case summary and Vis versa.


I need a new way to make the Excel sheet where the keywords of a test case are specified more clear, for example to combine each test case summary and the correspondant script in the same sheet.


Please are there any suggestions, are you using ways similars to what I need.


Thanks in advance.

2 Replies

  • tristaanogre's avatar
    Esteemed Contributor

    I'm assuming the test case summary is more of general text and not necessarily documented steps, actions, etc?  So, if this was a unit of code, it would be pretty much just a commented summary at the top of the unit?

    What if you wrote your reader for excel to detect, in the first column of any row, a particular character which would indicate to skip the row?  That way, in your sheet with your keywords, you could fill rows with the information from your test case summary and simply tell your reader to skip those rows?


    In the driver that I'm using for my own framework, I wrap the code that parses the keywords in a single "if" clause to detect such a thing.  Basically, I tell it to look for a semi colon (;) symbol in the first field of each row.  If it finds it, it skips the rest of the loop and moves to the next record.


    if (CaseDriverObject.Value(0) != ";"){

    Now, my reason for doing so is so I can activate and deactivate cases and such that I don't want to run simply by "commenting out" particular rows.  But you could achieve the same result and put your summary information into your keyword sheets.

    The other thing that I do is that, for every row in my step file, I have a separate "Comments" column that is not used for anything within my code.  All that column does is contain any information that I feel is needed to clarify what the test step is doing in order to inform anyone coming after.  You could employ such a thing as well... just add a column to your keywords test sheet that contains "Comments" and make sure that your automation framework doesn't do anything with that column.


    Just a couple of suggestions.

  • Ravik's avatar
    Super Contributor


     As per my understanding your TestCases have the reference of available keywords, but the problem is - If you have modified Keyword or TestCases, You have to update in both.


    You can try in excel -

    select column where you want to display your keyword

    1- Go to DATA tab


    3- In data validation pop-up  - Setting Tab

    4- Select LIST from drop down

    5- Click on Source (pop-up will minimize) - Select sheet2 (where your keywords present)

    6- Select Column where your keywords Stored and click on icon.


    This will add you all keywords in your TestCase sheet, so whenever you made changes in keywords it will be automatically reflect in TestCases sheet.




    You can create Macros in a way -


    Which is shows all available Keywords, Header for that Keywords (required parameter for that keyword)