RelevantCodes[1]One is now available for download.
I have been planning for a while now to release a framework for our community. I even started on a few ideas, but I felt it would be best if I received some feedback from you guys. Please use the comment section of this post to share your ideas of what you would like to see included in the framework. Also, it will also help me if you could suggest an application that you would like to be automated, because in the end, without your help and your great ideas, this won’t be possible.
PS. You can post as anonymous if you like, but, I would really like to know who suggested what so I can pay credit where its deserved.
{ 53 comments… read them below or add one }
Hi Anshoo,
This is what we have been waiting for …
The frameworks i downloaded from google are very complex and difficult to implement , we should understand the framework to Implement. We should start the Framework first with directory structure that contains all the QTP stuff(Datasheets,Library,documents,Scripts,Environment xml files,results,logs,Recovery Scenaros).Then the driver script calling all the sub and main functions implemented for all the validations and reporting ).That is what my framework is which is dependant on Domain.Application,Tool.
And in general many managers does not understand basic framework definition and are putting pressure on the resources to come up with generic framework independant of application,tool,This is what i hear from my frinds and in interview as well.I never implemented proper framework that does not mean i am not automation resource.
We will implement the framework for one application that is accessible by all and can be implemented in their project
Cheers
Suni
This is an excellent idea. I didn’t think of it like this. I was under the impression that putting the entire framework out at once would be the best course of action. But, you’re right. I will try to create documentation for everything in a way that the entire package is quite easy to understand.
I am going to reuse a scaled down and simplified version of my driver script from one of my projects, to make sure its easy to follow, even for people new to framework development. I am not looking to create a perfect structure, but a collection of ideas so people can use it to define their own ideology of what their framework should be.
Agreed. If a few people can come out and suggest an application that they’re familiar with, and would like to see automated, that’ll be extremely helpful.
I hope more people find this post, and suggest a few ideas because without the support of everyone, this won’t be possible.
Thanks- Anshoo
Hi Anshoo,
What is automation framework who write this automation frame work in a company what is role of auotmation tester work.what are the advantages and disadvantages explain me.
I need ur help regarding hoe to write automation frame work .I need step by step explaintion.
For example the sample http://newtours.demoaut.com to write a auto mation frame wok for this application I will understand .
And in general many managers does not understand basic framework definition and are putting pressure on the resources to come up with generic framework independant of application,tool,This is what i hear from my frinds and in interview as well.I never implemented proper framework that does not mean i am not automation resource.
I need ur help regrading this
Wouldn’t be better if you start from hybrid framwork, with explaining key word and data driven framwork? All the testers have alot suspense about this kind of frame work. and we have very less information about environment and functions please throw light on both the topics too.
Alkaa, yes, it would be best to begin with a hybrid framework because it gives a glimpse of what’s possible with other sorts of frameworks – since it is nothing but a collection of concepts. That’s also what I had in mind too :)
This is an excellent suggestion. You’re absolutely right and I should create a Post discussing how functions and procedures can be used in everyday automation. The same concepts would obviously trasfer when the framework is ready, eventually making it easier for everyone.
Hello,
We can also parameterize the environment and variable. Kindly throw some light on that issue too. till the time no one has discussed on that topics.
Do you mean parametrize Environment Variables & normal variables or parametrize values to be driven to the application? If its the former then, I think this has been discussed several times on a few forums, and if you want, I can find and direct you to those thread, or if its easier for you – I can try to create a new post on this website as well.
Also, if you would like to create multiple variables during run-time, it can be done through the Execute statement. For example:
Another example:
For y = 1 to 4 Execute "x_" & y & " = " & y Next MsgBox x_1 MsgBox x_2 MsgBox x_3 MsgBox x_4I hope this helps :)
Can you please throw some more light on “Execute” statement?
We can use the Execute statement to evaluate something that we have as a parameter. Therefore, we can use Execute statement like this:
or in a statement like this:
Note that, when we execute the 2nd line above without the help of Execute statement, we will always create an erroneous statement. That is, it will always return an error. Execute let’s us work around that. You can also read this post for more information.
As frame works differ from system to system and scope of the work It will be good to take some general examples and explain it. some of them may be
Ex: 1. A live customer support professional working for cancelling orders which are hundreds each day. How we design structure, frame, report..
2. Automating a testing regression suite for a complex system involving verifying GUI, Database, 3rd party systems, including data preparation, data cleanup , batch jobs , reports, etc etc typical ….
Hi Abrakh,
Are there any applications that you are aware of, which we can use to create such a framework? I’ve had several ideas over comments and e-mail, but nobody has yet recommended an application that will cover most of the concepts you described in your comment.
Once I have enough ideas and feedback from readers, I can finally begin working on it. :)
Thanks- Anshoo
Can anybody explain me about ObjectRepositoryUtil and when we can use it?
Hi Sridhar,
From QTP Help:
There are also several code examples available in the help, like this one:
Function EnumerateAllObjectsProperties(Root) 'The following function enumerates all the test objects under a specified object. 'For each test object, a message box opens containing the test object's name, 'properties, and property values. Dim TOCollection, TestObject, PropertiesCollection, Property, Msg Set TOCollection = RepositoryFrom.GetAllObjects(Root) For i = 0 To TOCollection.Count - 1 Set TestObject = TOCollection.Item(i) Msg = RepositoryFrom.GetLogicalName(TestObject) & vbNewLine Set PropertiesCollection = TestObject.GetTOProperties() For n = 0 To PropertiesCollection.Count - 1 Set Property = PropertiesCollection.Item(n) Msg = Property.Name & "-" & Property.Value & vbNewLine Next MsgBox Msg Next End FunctionYou can also view this thread at AdvancedQTP for more information: http://www.advancedqtp.com/forums/index.php/topic,1922.0.html
Also, I’m not sure what exactly you are looking for, but if you can ask specific questions about it, then I’m sure I will be able to provide more accurate answers.
Thanks for the reply Anshoo. I have another question. How to add multiple rows for a single parameter in Datatable at run time? Is there any method for the same?
Hi Sridhar,
There sure is a way to add data to the DataTable at runtime. The trick is to set the row where you would like to set the data using the SetCurrentRow method of the DataTable. When SetCurrentRow statement executes, it gives focus to the next DataTable row regardless of it having data, or no data. Please see the demo below.
Below is the code I ran:
iRows = DataTable.GetSheet(dtLocalSheet).GetRowCount For x = iRows + 1 to iRows + 5 DataTable.SetCurrentRow(x) DataTable("UserName", dtLocalSheet) = "Empty" NextBelow is the result in the DataTable:
I hope this helps..
Hi Anshoo…
I came across ur blog to learn QTP…if you could help me out in Creating a Framework like Data Driven, KeyWord it would be really helpful for new comers. like u said earlier..i need to have a framework with (Driver Script, Function, Gui Properties, Datapath, Exception handling)..i need to whts happening in QTP real world.
Eg..Lets take Ebay as example and create a Framework
Thanks
Rafiq
I would try my best, Rafiq. However, creating a Framework is quite complex and it takes a while before everything is arranged in a working order. This framework, however, will be even more complex for me to create because I would like to make sure that the concepts I implement are easily understandable to the readers. eBay is quite a complex application and I’m afraid the working structure may be too complex to understand. I was thinking of an application that is predominantly static.
Once I have enough feedback and more readers show interest, I guess, that will be a good time to start.
Hi Anshoo,
I have an idea for selecting the application for Automation Framework,as u have got to work on technologies like .net,siebel,java better u suggest few applications that is best suited for implementing all the components of Automation framework .Then we can conduct small kind of poll, the application with more votes can be choosen for developing framework,
I have been viewing the site from the scratch,I am happy the site is looking great day by day with many new qtp users.
Best wishes
Suni
Sounds fantastic, Suni. I will wait for a little more feedback from readers, then start a poll. I guess that’d be the easiest and the fastest way to receive input.
You’re right. This website has come a long way since it started. There is a lot more to be done, but its been difficult to shuffle time between writing articles, my job, forums and site design. I will get there in due time though, I hope..
I’m also very glad that people are enjoying what they read here. Its been extremely rewarding.
Thanks :)
Thanks Anshoo,
Yes Ebay is a complex application…you better take simple application which will have all required things to create Framework…so that as a starter we can understand easily…eagerly waiting for ur Framework
I will try to start quite soon considering a few weeks that it might take to build. I have a few ideas, but I would like to hear what the readers think would be a good application to automate. I would like to do it once, and do it well and incorporate some important concepts of test automation.
Which application would you guys prefer? Web or Windows? If Windows, do you guys think Calculator is a good application for this? Any thoughts on Web?
Hi Anshoo,
IBM has already written article for framework with Calculator application. I would like to prefer web application for the upcoming framework, if all the guys accept it.
Sounds good, Asiq. Now if everyone can come up with a good Web Application quickly :)
非常期待你的自动化测试架构,顺便问一下Arora,你懂中文吗? ^_^ —- ^_^
forwarding to your automation-framework release,by the way, Do you understand Chinese?
Unfortunately, I don’t.. However, I’m happy to know that visitors from so many different countries are visiting Relevant Codes :)
Hi Anshoo,
I came across lot of forums in past few months. But i think this was an excellent site that i never visited.
Great ! Thanks for your guidance in helping lot of members like me to learn QTP.
Thanks Ranjini! :)
Hi Anshoo,
Hi Anshoo i got such a wonderfull knowledge from this site, i appreciate your dedication to help the people like us,
i am very eager to get a framework demo from you.
Thanks
Mahesh
Hi Mahesh,
Thank you :)
The framework is ready, but I think I would like a few people to test it out first in their environments so we can fix a few bugs before distributing it to the community. I am still thinking about this though – I also need to create documentation for all libraries and find a way to show how the table is going to work.
Hi Anshoo,
I am glad to test your framework on my application if you don’t have any problem, definitely i will tell you the bugs that found in your framework demo, but i know there might be low priority bug. Please let me know if you need any help from my side.
Thanks
Mahesh
Thanks for the offer Mahesh. I would really appreciate that. The package comes with 3 test-cases and if those 3 run well in your environment, then 90% of the job is done. I would only need a bit of feedback on anything else that my require a bit of improvement.
Please use the contact form and include the e-mail where you would like the link to be sent. Thanks!
Now, only if a few more people who like to help me out.. :)
HI
Please send me the link to poulamig@rediffmail.com
Was trying to understand framewrk from sometime
The framework is in its Beta stage, and its only distributed to the readers who are interested in helping me test it and find a few defects that may arise when the release goes public.
Hi Anshoo,
I am ready to test it.
Hello Anshoo
Can you provide link? I would like to participate in eval. Thx
Hi Jay,
Unfortunately, the evaluation period is over. But, the good news is that the framework is now available for download which you can find here.
Cheers.
hi Anshoo,
Please give me the proper execution steps of this frame work “relevant codes”…
Naveen, have you already downloaded the framework?
Hello Anshoo,
This is a splendid framework. I appreciate your efforts in creating this wonderful framework. I am looking at this framework now, will get back to you shortly with my findings.
Regards
Chary Chelloji
Thanks Chary :)
I am in a phase of creating a minute framework – keyword driven and thus I am analysing different types of frameworks available over net. I’ll have a look at this one, try and use it and then come back to you with feedback, if any.
I have recently started reading your posts on this site and I would want to take this opportunity to thank you for serving the complete QTP world. You are doing a great Job!.
Gaurav
Thank you for your kind words, Gaurav! I’m extremely glad you found the material here useful.
Hi Anshoo,
Appreciate your efforts toward automation world!!!
Can you please share the updates on your framework.
There is one complication with this framework, that being how can we write VBS logical statements using this framework
as well as how can we run a test case multiple set of data.
Regards,
Vishwanath
Hi Anshoo
please provide me the steps to run this frame work
Hi Anshoo,
Can you please explain me how the Report summary is written to Results.
I am facing a problem , when i run mulitple scripts(in one excel) the summary it is shows only one test passed.Wrong number statistics in Main Results Summary .
Prasad: One report per test. Are you saving the results though? When you hit “F5″, make you you have “Write run results to” option checked.
Hi Anshoo,
I was using this framework but could please eplain what is ContextManager.dll? and its significance?
Regards,
Raja
Raja: ContextManager.dll offers methods related to Reporter. Please see the link below that shows a few methods offered by the ContextManagetClass: http://relevantcodes.com/Articles/Comments/context.manager.png
I have small doubt how I can run Single Test Case for different set of record using your current framework
People with different backgrounds in testing with different tools have varied definitions of what a good framework should be. That means, my definition will be different from another person working in my team. That. Is. Fine. However, you must first understand what types of frameworks there are, what they do, and how can they make automation easier for the entire team. Now, again, my previous statement can differ for a large team as compared to a very small team.
When Relevant Codes One is released, you will see that its based on a very simple principle and users can create their test cases in a table and execute them without EVER opening QTP or manipulating the libraries. I have always said this, and to reiterate, you must read about frameworks and try to come with up with an idea that works well for you. However, the more generic a framework gets, the more complex it becomes.
PS. You can learn about the types of frameworks here: http://www.ibm.com/developerworks/rational/library/591.html
this code is not workin..
What Root ??
what argument I need pass from calling function to make this script excutable
From where are you running this code? From QTP? External VBS?
{ 1 trackback }