| || |
Working with a huge web app containing approximately 8,000 pages
When working with a large web app containing at lease 8,000 pages, HP recommends to split the scripts/actions.
If you use a hybrid framework with only one small driver script calling many functions from Functions Library, there is no script/action to split.
However, the OR (Object Repository) is getting really BIG. This needs to be SPLIT into smaller ORs.
If in your original OR (sample.tsr, for example) you defined the browser name as "Browser1", can you keep using the same browser name in the other ORs or do you have to use a new browser name ("Browser2", "Browser3", etc.) in each of the additional smaller ORs?
Thanks for your input.
Gilbert have you thought of using a database or Excel for holding the object descriptions?
If you are using local Actions then you can use the same names in your example above.
Others please assist me here. I think if it a shared workbook then everything will be in one big clump so only one name will be in it.
I'm thinking that if you load multiple ORs that the Logical names would have to be different or UFT would say there is a confiict or would keep only one of them in memory. I have not tried this.
I''m thinking/writing out loud here.
I just had a one to one mapping of function libraries to object repositories. Essentially implementing a page object mapping.
LoginPage.qfl and LoginPage.tsr
Framework would see a call to Login and it would then load the LoginPage function library and Object Repository dynamically on demand.
As I recall any name conflict on objects in the repositories caused it to use the latest one. Should be a quick test to confirm. This can be managed with the RepositoriesCollection.Add method that allows you to add in a certain order and remove repos from memory no longer in use(once that step is done).
Last edited by NoUse4aName; 06-23-2015 at 10:31 AM.
Yes the ORs will have different names.
What I am looking for is, if you use only one browser defined in your OR as "Browser1", if you can use the same browser name in multiple ORs from splitting the huge OR.
Browser("Browser1") 'or does this have to be Browser("Browser2")?
Regarding the use of database or excel.... No I have not thought of using them since all existing scripts here from years back use Object Repositories.
If you have been using database or excel instead of OR, can you share the advantages/disadvantages and maybe show a small example?
UFT seems to have some issues with large Object Repositories (OR).
When the file size reaches 12,864 KB or 12.5 MB.
1. The only message you get when you try to add and save more objects is "A general failure occurred when attempting to save the object repository file.".
2. Let's say your sample.tsr (OR) file size is not 12,864 KB and you split it into two files.
File1: sample.tsr (the original file)
File2: sample1.tsr (newly created)
Cut and paste many Pages/Objects from File1 to File2 and save both files.
File1 still shows 12,864 KB.
File2 shows like 3,000 KB.
Delete more objects/pages from File1 and save.
File1 never changes to a smaller file size and still shows 12,864 KB.
Create File3 'sample2.tsr' and copy/cut and paste all remaining objects from File1 to File3.
File3 file size is similar to File2 showing 3,000 KB approximately.
It seems like when this 12,864 KB number is reached, it stays that way.
Last edited by Gilbert; 06-30-2015 at 12:19 PM.
Reason: more info
Yeah I think they only ever intended for ORs to be scoped at the action level. Not an entire application's worth in one big repo.
I do recall that OR size not shrinking issue from another thread years ago. Forget what the solution for that was. But the workaround is to create new and copy/paste like you did.
Here's the copy of the issue and the work-around that HP provided:
In QuickTest Professional (QTP)/Unified Functional Testing (UFT), the local object repository file (ObjectRepository.bdb) can be found under the Action's folder to which it belongs to. The default size of the file starts at 192 KB.
After adding/learning many objects, the object repository file size increases significantly. Removing test objects from the object repository does not seem to have an impact on the file size, as it will remain with the same size even if it is emptied.
The size of the BDB file is not reduced back to 192 KB due to internal implementation of the Berkeley Database. Space freed by deleting data from the BDB file is never returned to the filesystem, although it is reused where possible.
To reduce the file size after removing test objects from it:
1.Export the Local Object Repository to a Shared object repository file (File > Export Local Objects...).
2.Close your current test.
3.Change the shared object repository TSR file extension to BDB (i.e. name the tsr file as ObjectRepository.bdb).
4.Backup the original local object repository file, and place the new ObjectRepository.bdb file under the Action's folder to use it as the local object repository. The new file size should be smaller than the original.
you can save OR based on the page or module and invoke OR before the execution of each module.
Originally Posted by venu.adhikesevan
I'm not sure exactly how this is done. Maybe you can share a sample or two.
We use a hybrid framework and all functions and object repositories for a given test script are all defined in InitializationSettings file.
So for this case of a huge web app with a pretty large OR, I'm planning to split this into two or more smaller ORs and insert entries for the newly created ORs in the InitializationSettings file.
Thanks for your input.