cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement complex logical scenario in a keyword driven automation framework

SOLVED
Highlighted
Contributor

How to implement complex logical scenario in a keyword driven automation framework

I have implemented Keyword driven framework for my project in which I have written functions for different actions that are being performed on the aplication e.g. Click, Input etc. I am Passing the objects alias name and keyword name through an excel sheet. A driver script is written to extract this data from Excel using DDT driver.So for every step of testcase I pass object's alias name and keyword to the driver script.

Now I need to create a test case in which I need to split a string and extract a number out of that, at one page and reapeat the same process on two other pages and after that compare results. I am not able to understand how should I implement it.Can someone please guide me.

How should I implement this scenarios in my framework. How can I store data extracted on each page and then perform calculation at the end.

Please give a sample code if possible.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: How to implement complex logical scenario in a keyword driven automation framework

Two suggestions:

 

1) Investigate using Project or Project Suite variables to store the values globally so that you can then access them in subsequent test steps.

2) If you'd prefer a more direct "code" solution, consider making a Script Extension Run Time Object that has properties that you can read from and write to that will be available between test steps/scenarios.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available

View solution in original post

6 REPLIES 6
Community Hero

Re: How to implement complex logical scenario in a keyword driven automation framework

Two suggestions:

 

1) Investigate using Project or Project Suite variables to store the values globally so that you can then access them in subsequent test steps.

2) If you'd prefer a more direct "code" solution, consider making a Script Extension Run Time Object that has properties that you can read from and write to that will be available between test steps/scenarios.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available

View solution in original post

Community Manager

Re: How to implement complex logical scenario in a keyword driven automation framework

Hi @meenakshiyadav1,

 

This is a very important question and it's discussed quite often in the Community. Check one of the latest discussions in addition to tristaanogre's answer:

https://community.smartbear.com/t5/TestComplete-General-Discussions/Can-anyone-here-provide-me-Testc...

 

Community, more thoughts?

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Contributor

Re: How to implement complex logical scenario in a keyword driven automation framework

Thanks for your reply @TanyaGorbunova. The link posted by @tristaanogre take me to a repository..I am not able to download anything from there and I am not sure I can I take benefit from that.

I have done Iinitial setup of a keyword driven framework  and it is working for me for automating simple actions on my AUT. I need guidance on handling complex scenarios, I am not sure how to take output from one step and utilize that in another step to perform calculation and camparison etc.

 

 

Contributor

Re: How to implement complex logical scenario in a keyword driven automation framework

Thanks for your reply Robert @tristaanogre. I will try these two things and will update status here.

 

Regards,

Meenakshi

Community Manager

Re: How to implement complex logical scenario in a keyword driven automation framework

Hi @meenakshiyadav1,

 

Do you mind sharing the solution you've found with us?

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Contributor

Re: How to implement complex logical scenario in a keyword driven automation framework

Hi @TanyaGorbunova 

 

apologies for replying late on this.First solution provided by @tristaanogre   i.e. to use project variable has worked for me partially. To handle the complex scenarios completely, I am creating a seperate keyword for that perticular scenario.

New Here?
Join us and watch the welcome video:
Top Kudoed Authors