The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP Functional Testing / Mercury QuickTest Pro / QTP

Pages: 1 | 2 | >> (show all)
Shreejit
Member


Reged: 03/06/12
Posts: 232
'My Beautiful Framework'
      #703559 - 04/05/12 11:04 PM

Hi All,

I started this thread so that people could share the 'one bestest part' about their framework.
Others could obviously take some tips out of it.
The best part about our framework (which is still in its infancy) is the strength of the keywords developed and robustness for eg. ClickOrValidate () - single keyword performs any click operation on the UI / Validates any data on the UI allowing us to reduce our overall list of keywords


Post Extras: Print Post   Remind Me!   Notify Moderator  
ManishBansal
Active Member


Reged: 08/15/07
Posts: 732
Loc: Six Feet Under
Re: 'My Beautiful Framework' [Re: Shreejit]
      #703570 - 04/06/12 02:59 AM

First of all... the title sounding me very funny..
Well a good thought, but you will find a lot of similar threads on the forum already.

Still lemme share some of my thoughts on this thread.

1) Framework should be very simple, small, fast, generic, should have very less files, i suggest only 1 file framework.
2) allow easy adoption by by other teams and other users.
3) Never reinvent wheel.
4) should make your life easy then complicating it.
5) if it is qtp based framework, it should leverage maximum QTP inbuilt functionalities.
6) maintenance should not be a nightmare.
7) everything should be planned in advance before developing a framework.
8) should be able to provide good crisp reporting drilling down to the actual issue.
9) always separate from business functionalities
10) and finally, just start using them then keep on building building and building.

--------------------
Thanks,
Manish Bansal


Post Extras: Print Post   Remind Me!   Notify Moderator  
Rastek
Member


Reged: 12/27/10
Posts: 269
Loc: Istanbul
Re: 'My Beautiful Framework' [Re: ManishBansal]
      #703682 - 04/09/12 06:04 AM

Shreejit Can you please provide more information about the framework. Is that a OTA-API based franework ?

What kind of a framework we are talking here ? Thanks.

--------------------
I look serious because I am serious.


Post Extras: Print Post   Remind Me!   Notify Moderator  
lockdown
Member


Reged: 02/07/07
Posts: 393
Loc: London
Re: 'My Beautiful Framework' [Re: Rastek]
      #703773 - 04/10/12 02:12 AM

Hi Shreejit

I like this thread, it can give a bit of insight into what everyone's working on.

For me, it's the GUI layer on top of our keywords which is enabling our manual testers to automate the AUT without having to understand the QTP object repository structure.

--------------------
Automation Blog


Post Extras: Print Post   Remind Me!   Notify Moderator  
mwsrossoModerator
Veteran


Reged: 09/30/01
Posts: 4974
Loc: Doncaster, UK
Re: 'My Beautiful Framework' [Re: ManishBansal]
      #703790 - 04/10/12 04:44 AM

Quote:


1) Framework should be very simple, small, fast, generic, should have very less files, i suggest only 1 file framework.





Manish I have tried to think of how you could build a robust framework using only one file and I can't. Do you have any information on how this might be achieved?

mark Smith.


Post Extras: Print Post   Remind Me!   Notify Moderator  
mwsrossoModerator
Veteran


Reged: 09/30/01
Posts: 4974
Loc: Doncaster, UK
Re: 'My Beautiful Framework' [Re: mwsrosso]
      #703793 - 04/10/12 04:49 AM

Similar approach here Lockdown but using Excel as the user interface. One QTP resource maintaining the framework and testers 'creating' the automated tests which are converted into QTP executable code at runtime.

Mark Smith.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Shreejit
Member


Reged: 03/06/12
Posts: 232
Re: 'My Beautiful Framework' [Re: mwsrosso]
      #703847 - 04/10/12 10:04 AM

@lockdown - That was the idea..felt like a one stop shop to know what ppl have been doing
@lockdown - Care to provide a briefing on the GUI layer (any piece of code / snapshots would be of gr8 help)

Our framework is like what 3 months old now: Good code, easy to use, no code breaks
Problem areas:
1. Lot of keywords to achieve a lot of functionality (testers confused which keyword to call when and what parameters to pass to the functions)
Any suggestion what i can do here?
A chm file or something i am not sure what exactly should i be doing here
Something like a one stop
User Interface1 - List of keywords available
User Interface2 - List of keywords available
Generic keywords - SendEmail,ValidateDatabase,ValidateMainframeLogs,Comments
etc etc
basically ease the use of manual testers, so that the automation folks can focus on the more concrete problem solving areas


Post Extras: Print Post   Remind Me!   Notify Moderator  
NoUse4aName
Super Member


Reged: 06/13/08
Posts: 1720
Re: 'My Beautiful Framework' [Re: Shreejit]
      #703848 - 04/10/12 10:23 AM

We don't use keywords per se. Go with more of a page object approach. Manual tester creates a reusable test of all possible interactions on a page, in english sentences, written like a manual test case but with data parameters in Quality Center. An actual test is comprised of calls to these reusable tests for each page in the application.

Automater comes in and codes up a reusable function/class for that page that takes in the parameters and executes all the steps(except a blank param means skip that step/leave field blank). Once that's done for all the needed reusable portions, manual testers can create thousands of tests and they'll be ready to run as automated without any action needed by an automation developer.

Test Processor calls the appropriate function/class based on what steps are in a particular test case. Using the OTA API can execute these tests from Quality Center test lab in QTP(retiring our usage of that) or Selenium and post results back to Quality Center.


Post Extras: Print Post   Remind Me!   Notify Moderator  
mwsrossoModerator
Veteran


Reged: 09/30/01
Posts: 4974
Loc: Doncaster, UK
Re: 'My Beautiful Framework' [Re: Shreejit]
      #703852 - 04/10/12 11:03 AM Attachment (127 downloads)

Quote:

snapshots would be of gr8 help




What we do is when a keyword is selected from the keyword drop-down list is display a small overview of how to use the keyword but also populate the required fields with a prompt. See attached screenshot.

Mark Smith.


Post Extras: Print Post   Remind Me!   Notify Moderator  
ManishBansal
Active Member


Reged: 08/15/07
Posts: 732
Loc: Six Feet Under
Re: 'My Beautiful Framework' [Re: mwsrosso]
      #703881 - 04/10/12 10:43 PM Attachment (129 downloads)

Hi Mark,
Let me try to elaborate.
1) Framework should be very simple, small, fast, generic, should have very less files, i suggest only 1 file framework.


1) very simple : for our end users (not just the users who are configuring & running it, but also for the other automation teams/developers to understand and reuse it 100%), other automation team should not spend much time referring to documents every time they are using.

2) small & single file : the framework we have developed is having only one file we call it Core.qfl
this is the back-born of the framework, it has very few say only 5 public functions and other are private)
it helps easy maintenance, and give portability, if anyone want to reuse this framework then he/she just have to add this file in his resources and that's all. (we keep this file in SVN)

Mark, we also have other files too, but we call them plugins to our framework ( CoreWeb.qfl, CoreNet.qfl, CoreJava.qfl, CoreInfragistics.qfl so and so forth) can be added on demand

We also have 2 more files 1- globalrecovery.qrs , 2 - RecoveryFunctions.qfl (Need not to attach them to resources)

Finally the best part of our framework is our COM dll, which needs to be register (framework automatically register if COM cannot able to create object) - Thanks to Tarun lalwani
we have all non-qtp utility functions in our dll. (screen-shot attached)

3) Fast - it is based on recovery , so we never check our control, just do the operation on that control, if the operation is successful, its good, otherwise recovery executes(No need to check Exist, disabled, ListItems, duplicateitems and duplicate objects explicitly )
One more thing, our recovery is doing nothing but calling a function and this reports (so no messy reporting due to recovery)

Its fast because, for all common operation we are using COM object (pre-compiled dll)

4)generic - this framework is really not having any business functionality, you just have to attach Core.qfl files, now record your test and then do some modification in OR, and your script is ready, that's all.

on the good node!, our framework is make our life & work simple efficient and not complex.

--------------------
Thanks,
Manish Bansal


Post Extras: Print Post   Remind Me!   Notify Moderator  
mwsrossoModerator
Veteran


Reged: 09/30/01
Posts: 4974
Loc: Doncaster, UK
Re: 'My Beautiful Framework' [Re: ManishBansal]
      #703893 - 04/10/12 11:57 PM

You haven't mentioned a QTP driver script (Script.mts) do you still require the use of this in the framework manish?

Mark Smith.


Post Extras: Print Post   Remind Me!   Notify Moderator  
ManishBansal
Active Member


Reged: 08/15/07
Posts: 732
Loc: Six Feet Under
Re: 'My Beautiful Framework' [Re: mwsrosso]
      #703929 - 04/11/12 02:48 AM

oh yes, thanks to point it out, their are two ways of doing it...


1) create an action (first in the flow), you can call it DriverAction (it will call 3 functions)

i) Initialize()
ii)DriverFunction()
iii) ExitTest() 'QTP inbuilt

or you can just call them from Action0 (Not visible in QTP), by modifying Script.mts

Mark,
adding these calls in Core.qfl create issues with QTP.




I wish i could share some document over the forum, but i am not permitted because they are part of our company assets.

but i am planning to update it on my blog/sqaforums, and share my strategy for discussion.

--------------------
Thanks,
Manish Bansal


Post Extras: Print Post   Remind Me!   Notify Moderator  
Shreejit
Member


Reged: 03/06/12
Posts: 232
Re: 'My Beautiful Framework' [Re: ManishBansal]
      #704007 - 04/11/12 10:20 AM

@Mark - Thats neat.
We are working on a chm file for ready reference and split it up into UI / Generic.UI's would be keywords available for specific UI level operations. Generic keywords would be available across all UIs (Prompts, Check exists, Sync etc)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Shreejit
Member


Reged: 03/06/12
Posts: 232
Re: 'My Beautiful Framework' [Re: NoUse4aName]
      #704008 - 04/11/12 10:24 AM

Quote:

Once that's done for all the needed reusable portions, manual testers can create thousands of tests and they'll be ready to run as automated without any action needed by an automation developer.




This is our issue. Manual test scripts are completely independent of automation scripts. Whatever those guys dump into their sheets we have to interpret it and use it in our automation scripts

Also we have a suite of 80 scripts to be automated.
As of now a dedicated workbook exists for every script.
What should i do? Should i club them into all one excel?
Every workbook has on average 1000 lines in the excel.
80 workbooks would become huge eventually, right now we are automating just the 2nd script.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Shreejit
Member


Reged: 03/06/12
Posts: 232
Re: 'My Beautiful Framework' [Re: Shreejit]
      #704009 - 04/11/12 10:32 AM

Also, I need help in one specific issue happens during navigation from Page A -> Page B
PageA (fill up fields)
Click on Continue button
Navigate to Page B

During this specific step i might run into hordes of integration issues.
1. Integration systems are down
2. Database is down
Is there a way i can trap these error messages inside my recovery function
(I get a script error on trying to perform the operation on an object on Page B since Page B was never displayed in the 1st place)
Function Recovery1(Object,Method,Arguments,Retval)
Is there a way to trap the innertext of the browser parent
I have the Object with me but not the parent
Something like Object.GetTOProperty("parent")
'Basically i wanted the browser parent of the object and find the innertext of the browser object and check for various integration issues
End Function

Also what does the "retval" contain?


Post Extras: Print Post   Remind Me!   Notify Moderator  
GregEncke
Member


Reged: 02/11/08
Posts: 277
Loc: Seattle, WA
Re: 'My Beautiful Framework' [Re: Shreejit]
      #704011 - 04/11/12 10:42 AM

I do a screen shot, exit the test and have a function that closes down resources.

--------------------
Patience is like bread I say.... I ran out of that yesterday.


Post Extras: Print Post   Remind Me!   Notify Moderator  
kayd
Member


Reged: 05/22/07
Posts: 60
Re: 'My Beautiful Framework' [Re: GregEncke]
      #704038 - 04/11/12 06:39 PM

can some one plz guide to me web testing framework. samples?

Post Extras: Print Post   Remind Me!   Notify Moderator  
Shreejit
Member


Reged: 03/06/12
Posts: 232
Re: 'My Beautiful Framework' [Re: GregEncke]
      #704041 - 04/11/12 08:41 PM

Quote:

I do a screen shot, exit the test and have a function that closes down resources.




Greg this is what my upper management also wants gracefully exit the test and clean up. But my point is unless its a worst case scneario why should we exit the test (this should be the last resort right?).
The best thing to do would be make qtp recover from the current error and try and re correct itself (as much as possible / proceed with a workaround)


Post Extras: Print Post   Remind Me!   Notify Moderator  
mwsrossoModerator
Veteran


Reged: 09/30/01
Posts: 4974
Loc: Doncaster, UK
Re: 'My Beautiful Framework' [Re: Shreejit]
      #704045 - 04/11/12 11:25 PM

In the event of a test case failure our framework will report the issue, capture a screenshot and embeded a link to it in the HTML report, reset whatever is required then move on to the next test case.

This way we can run unattended test packs/suites while the testers create more tests and we (the automators) can work on requests for new functionality or enhancing existing functionality.

Mark Smith.


Post Extras: Print Post   Remind Me!   Notify Moderator  
lockdown
Member


Reged: 02/07/07
Posts: 393
Loc: London
Re: 'My Beautiful Framework' [Re: mwsrosso]
      #704078 - 04/12/12 06:05 AM Attachment (172 downloads)

I've attached what we've got. It's pretty similar to most keyword approaches, only with an added GUI on top.

The GUI makes it really easy for the manual testers to know which objects they're working with and what the actions do, it does add a bit of an overhead when we add test objects - basically for each object added to the OR we have to "map" it into another Excel workbook and:
- Say where in the GUI tree structure it should be saved.
- Capture a screenshot.

This doesn't actually take too long as we have a screenshot capture tool we launch from the mapping workbook where we just drag around the object and it saves the screenshot for us.

This mapping worksheet also tells the framework which high level keywords are available to the GUI tree nodes, and which low level actions are available to the objects.

Timescale wise, it's evolved over the past 6 months. Fortunately I've been given time to develop this, I'm hoping to publish some stuff around it later in the year when I get some free time (and permission).

Regarding failure / recovery, we always call an initialise action at the start of each test - this determines if we need to shut down and clean up or if we can carry on from the open application.

--------------------
Automation Blog


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1 | 2 | >> (show all)



Extra information
0 registered and 59 anonymous users are browsing this forum.

Moderator:  IanFraser, Rajkumar_Rajangam, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 6638

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5