Sunday 18 February 2018

Shared Object Object Repository corrupted in UFT/QTP - INFORMATION CANNOT BE RETRIEVED FOR THE SELECTED TEST OBJECT

Sometimes you will get a message as "Information cannot be retrieved for the selected test object." when you are trying to edit/add shared object repository from Object Repository Manager in UFT/QTP.

It is quite annoying if you have lot of objects added in your shared OR and when you get such message. Once you receive this message in OR you can't add/modify any objects. It throws an error while saving OR.

Remember one thing, there is no direct solution to fix this. Following are few work around options. But some times these work around options too doesn't work. It happened for me too and Micro Focus team didn't provide any fix for this other than providing work around options.

1st Option:
Open the OR in the object repository manager.
Click on file->Export to XML. Save this xml file on the computer.
Close the object repository manager and open it again.
Click on File->Import from xml and import the XML you have just created.
Click on File->Save as to save this imported data as .tsr file.
Open the object repository comparison tool (Tools-> Object repository Comparison tool) and compare the new and the old repository. They should be same.
This newly create OR should resolve the issues.

2nd Option:
Create new empty OR and save it
Open corrupted repository in another window in OR Manager
copy objects whichever you need from corrupted OR to new OR

3rd Option:
Though this is not the option. you can choose this option if you have failed in above 2 options
Create Object Repository again from beginning :)

4th Option:
Keep maintaining back ups while you are creating OR. whenever you

Micro Focus team is aware about this defect in their product.




Tuesday 13 February 2018

Create group reservations for concurrent licenses

To reserve a limited amount of licenses for use by different groups of users.

Instructions:

1. Create a plan which machines/users are restricted to using (or from using) particular amount of licenses and/or its features

2. Create the Reservation file (lsreserv) based on step 1 using the Wlsgrmgr.exe (see more on below section)

(Recommended) Save created file on the same directory where the process used by the License Server service.

3. If file is not saved on above location, then create a Windows System Environment Variable called “LSRESERV”, pointing to where lsreserv file is located (step 3)

Note: If the variable is not set, the local directory is searched for the “lsreserv” file. If none of the above suggestions are set, reservation feature is not used.

4. Restart the License Server service

5. If above doesn’t reflect the use of file, then restart/reboot machine
Note: To disable/turn-off the reservation file, just rename LSRESERV file mentioned on steps 2,3, and restart License Server.

General Guidelines:

1. The name of the file containing the group reservations should be lsreserv, and it should be located in the installation directory for the license server.

2. Adding, modifying, or deleting the lsreserv file must be followed by restarting the SentinelLM service for the changes to take effect.

3. User names in the lsreserv file are case-sensitive.

4. User names can appear in more than one group. The license manager searches downwards through the lsreserv file, using the first group it finds with that user in it.

5. Adding, modifying, or deleting the LSRESERV system environmental variable requires a server reboot for the changes to take effect. The value of this system environmental variable should be the full path (including the file name) to the lsreserv file, and it allows the reservations file to be placed somewhere other than the installation directory.

Setting Group Reservations
Group reservations give you the ability to exercise local administrative controls by associating a series of groups with each feature and reserving for each group a pool containing a certain number of licenses. Any licenses not specifically reserved fall into the general pool.

Including/Excluding Users
Selected users can be allowed to run certain applications or can be prevented from accessing applications. This can be used as an additional security measure.

Including/Excluding Computers
Certain computers can also be allowed to run or prevented from running applications. This can help to balance application usage when you want to prevent users from running applications on heavily loaded computers or file servers.

Configuring the Reservation File A group specification consists of:

1. The name of the feature for which the reservation applies.

Important: If you use FT-Unified and FTAddIns license features, please ensure, that you use first FT-Unified and then FTAddins. Otherwise the reservation for the FT-Unified feature will seemingly be ignored. This seems to be either a defect or an internal interpretation error.

2. The name of the group

3. The number of licenses reserved for that group

4. The login names of users or host IDs of computers that belong to that group

The groups must be mutually exclusive. Different groups for the same feature should not have common users or computers. The number of licenses reserved for a feature cannot exceed the number of concurrent copies specified in the license code for that feature.

Background functionality

1. When the License Server receives a request, it checks whether the user making the request belongs to a group. If so, and licenses are available for that group, the License Server will issue the license(s) and remove them from that group’s pool. Otherwise, requests will be serviced with licenses from the general pool until no licenses are available.

2. At start up, the License Server consults the environment variable, LSRESERV, for the path and file name of the reservation file. If the variable is not set, the local directory is searched for the file, lsreserv. If no file is found, the License Server assumes that no reservations exist. Reservation File (lsreserv) Format
Group reservations should be entered according to the following format, with one group per line:

feature_name,ver:group_name:num_of_licenses:{ user_name | computer }

One or more of user_name and/or computer may be specified, but at least one value must be specified in the last field. Version number is optional. If no version number is specified, only the feature name is used.

The characters $ and ! have special meaning: $ indicates the computer name, and ! indicates a logical NOT.

For example, two users, one computer in group 1:

stars:group1:2:tom bryant $athena

One user, one computer in group 2:

stars:group2:1:doug $0x4f3c5801

One computer to be excluded from dots, two licenses to be reserved for jill:

dots:group1:2:!$0x592ae8b0 jill

In these examples, the two groups denoted as group1 are distinct because they specify different feature names.

The following apply to groups:

* A maximum of 256 groups with 256 members (user names or computer IDs) each are supported. Versions of the license server greater than, or equal to, 8.0.5 support 1024 members in a group.

* Groups must be mutually exclusive.

* Different groups for the same feature should not have common users of computers.

* Group names and member names cannot exceed 64 characters each.

* The number of licenses reserved for a feature cannot exceed the number of concurrent copies specified in the license code for that feature.

* If you want to exclude all members of a group from using license tokens for a feature, you can specify 0 tokens.

* If the number of license tokens reserved is greater than the number of concurrent copies specified for the feature in the license code, the number of tokens specified in the license code will be used.

* The group reservation assumes the priority as per the information available in the group reservation file.

* The License Server user guide(index.html) can be found in \LicenseServer\server\SysAdminHelp. In this guide “Setting Group Reservations” directory has detailed information on how to setup reservation to users or groups.

Automation Object Model (AOM), how we can use that in the real life scenarios

The Unified Functional Testing (UFT/QTP) Automation Object Model (AOM) is an application programming interface (API) designed to write programs that automate your QTP/UFT operations. The AOM provides objects, methods, and properties that enable you to control QTP/UFT from another application.

The AOM enables you to automate test management.

You can control virtually every QTP/UFT-GUI feature and capability using the objects, methods and properties included in the Automation Object Model. Automation scripts make it easy to perform any QuickTest operation multiple times in multiple tests without having to open the QTP/UFT application, for example,

•You can write a script that modifies the test object description properties in the Object Identification dialog box and performs an update run on all tests in a specified file folder.

•After installing a new add-in, an automation script can associate this add-in to all relevant tests.

•You can write an automation script to run a selected batch of tests. For each test, you can retrieve the associated add-ins list. Then, if the necessary add-ins are not already loaded, you can close QTP/UFT, load the necessary add-ins, reopen QuickTest, and run the test.

•You can define your settings for a test in QTP/UFT, then click "Generate Script" in the Generate tab of the Test Settings dialog box to generate an automation script based on the current test settings. You can then apply those same settings automatically to multiple tests using the whole automation script or excerpts from the generated file.

Example: Create and run an automation program from Microsoft Visual Basic that loads the required add-ins for a test, starts QTP/UFT in visible or minimized mode, opens the test, configures settings that correspond to those in the Options, Test Settings, and Record and Run Settings dialog boxes, runs the test, and saves the test.

Creating automation programs:

The Properties tab of the Test Settings dialog box, the General tab of the Options dialog box, and the Object Identification dialog box each contain a "Generate Script" button. Clicking this button generates a automation script file (.vbs) containing the current settings from the corresponding dialog box.

You can run the generated script as is to open QTP/UFT with the exact configuration of the QTP/UFT application that generated the script, or you can copy and paste selected lines from the generated files into your own automation script.

Generating an automation script for QTP/UFT options:

1.Go to Tools -> Options.

2.Select the General tab.

3.Click <Generate Script>.

4.Save the script to the desired location.

5.Click <OK> to close the Options dialog.

Generating an automation script for test settings:

1.Go to Test -> Settings.

2.Select the Properties tab.

3.Click <Generate Script>.

4.Save the script to the desired location.

5.Click <OK> to close the Test Settings dialog.

Generating an automation script for object identification settings:

1.Go to Tools -> Object Identification.

2.Click <Generate Script>.

3.Save the script to the desired location.

4.Click <OK> to close the Object Identification dialog.

The QTP/UFT Automation Object Model Reference file is a help file that provides detailed descriptions, syntax information, and examples for the objects, methods, and properties in the QuickTest Automation Object Model.

When QTP/UFT is installed is possible to open the Automation Object Model Reference from:

•The QTP/UFT program folder (Start -> Programs -> QTP/UFT -> Documentation -> Automation Object Model Reference)

•The QTP/UFT Help menu (Help -> Automation Object Model Reference)

Sunday 11 February 2018

QC to ALM upgrade high-level steps involved

Upgrading QC to ALM is not easy until unless if we choose right process which suites to our current project landscape.

Following are the generic steps which will helps us in upgrading QC to ALM in Linux server

1. Prepare ALM upgrade requirement document
2. Request for ALM compatible Linux server
3. Set up directories and mount points in Linux
4. Prepare ALM upgrade technical approach document
5. Install DB(Oracle) server in Linux
6. Install ALM server in Linux
7. Stop ALM and QC production server
8. Back up the project repositories and DB schemas from source (QC old system)
9. Shut down Oracle DB server in ALM installed in Linux server
10. Export and import DB schemas in Oracle DB
11. Up QC production server and continue using till ALM live upgrade completed
12. Place the project repositories in the appropriate directories
13. Consider sample project for upgrade and prepare dbid.xml file, schema exception files..etc
14. Up ALM and DB server
15. Login to site administrator and perform sample project upgrade
16. Carry out testing on the upgraded project
17. Prepare cutover plan
18. Get approval from management for the QC upgrade to Go-Live
19. Notify to all QC old system users about the downtime and new ALM server
20. Shut down QC old system - production project
21. Backup the project repository from QC old system
22. Backup the DB schema files(Project and Site Admin) from QC old system
23. Cross check the files and directory count and total size of the backed up repository and schema
24. mount project repository to new linux server
25. Perform schema export/import to new DB server
26. Check DB User permission
27. Run SQL queries in following order
a. qc_sys_db___oracle.sql
b. qc_admin_db___oracle.sql
c. qc_project_db___oracle.sql
28. Update dbid.xml file with latest parameters
29. Update schemaexception file
30. Set "SRM_SKIP_DB_LOCALE_INCONSISTENCY" value as Yes in the parameters section from SiteAdmin
31. Verify and repair project from site admin
32. Upgrade the project from SiteAdmin
33. Up ALM server
34. Perform smoke testing on ALM
35. Notify all QC old system users about the upgrade successful
36. Run Asset Upgrade tool on upgraded project to upgrade UFT scripts

Saturday 10 February 2018

UFT/QTP Concurrent License utilization Log file generation

Unlike ALM users administration from SiteAdmin, UFT concurrent users administration is not so user friendly. There is not direct option to administrate users of UFT who are using licenses currently.

Following steps can help us who is using when. We can share this report to management, so that it allows offline administration on the available licenses.

Please follow in below steps for QTP Concurrent Licenses utilization Log file generation:

Step 1.  Install all the utils for Sentinal from QTP/UFT software

Step 2. Search for lsusage.exe (thats what we would use to convert our log to CSV format)
(Assume its at C:\Documents and Settings\"User"\LicenseUtils\lsusage.exe

Step 3. Open Command prompt navigate to C:\Documents and Settings\"User"\LicenseUtils

Step 4. Type in lsusage.exe -l C:\Windows\system32\lservsta -c C:\results.csv and hit return
Verify C:\results.csv has been created.

Step 5. Insert the following headers to the csv starting from Cell  A1 through to Cell Q1
FeatureName Version DayOfWeek DateOfTrans TimeOfDay LoggingType KeysInUsed UsageTime UserName HostName LmLibVer NoOfLicenses ClientLockedStr QueueKeyId AbsPos GrpPos
GrpName and save it.

Step 6. Column G KeysInUsed represents the number of concurrent licenses at any specific time frame within the log.

Step 7. Open the ReportDB.mdb file from the utils folder.

Step 8 import Results.csv
( Tables>>New>>Import Table>>OK>>Browse to C:\Results.csv
(You would need to select Text files from the  Files of type dropdown)
>>IMPORT Select Delimited>>Comma>>check First Row Contiains Fiels names>>Ina a new Table>>Next>>Let Access choose..>> name the table as "LServlog">>Finish

Saturday 3 February 2018

New Features available in ALM 11.52 compare to QC 10

Following are the key features available in ALM 11.52 compare to QC 10.

Key Feature Details
Added/enhanced in ALM 11.52
Business Views(excel reporting)
Newly added in ALM 11.52 version on wards
HP Sprinter
Newly added in ALM 11.00 version on wards
Business Process Models
Newly added in ALM 11.00 version on wards
Requirements Templates
Newly added in ALM 11.00 version on wards
Test Configuration
Newly added in ALM 11.00 version on wards
Mobile App Access
Newly added in ALM 11.00 version on wards
Optimized Repository
Newly added in ALM 11.00 version on wards
QC Sense
Newly added in ALM 11.00 version on wards
Term Licensing
Newly added in ALM 11.52 version on wards

General Usability Enhancements

The ALM Options Window has an Open in Full Screen mode icon that opens ALM in Full Screen mode, allowing you to take advantage of the entire screen when using HP ALM.
Option available to move the position of any test artifact from UI. 

Business View Excel Reports

ALM professionals can now easily slice and dice, shape and share any ALM data using the new Business Views Excel add-in. Once installed, the add-in appears as an additional tab in Excel, allowing you to populate worksheets based on ALM Business Views—without opening ALM, and to use the rich Excel toolset to view and analyze the data.

HP Sprinter
HP Sprinter is a semi automation testing tool which can be used as manual testing accelerator. Sprinter documents every action you take within the application and writes the action on the test report and automatically take a snapshot of the form or page right after the action was taken. By taking that highly document execution report and converting it into a precise test case within ALM will save your tester time and allow you to use less qualified resources to execute test cases with little or no training on the application under test.. By far, this feature alone is a game changer for managers that are trying to distribute the work load across a diverse IT group or reallocate more experience staff for other key projects.

Project Planning and Tracking (PPT) Release Enhancements

When selecting content to be included in release scope items, you can now include defects that link to selected requirements, tests, and tests sets (and their associated test instances, runs, and run steps).

Administration Updates
Several new site configuration parameters were added, and some parameter names were changed.

Business Process Testing
New HP Application Lifecycle Management 11.52 features are also supported for Business Process Testing entities. In addition, business process tests and flows no longer use the BPT wrapper test mechanism when running with UFT 11.50.

Lab Management
Several enhancements were made to Lab Management. When running tests from functional test sets and build verification suites, you can use the Suggested Duration feature to set the duration of your test based on previous test executions. Updates were also made to HP ALM Lab service - with the Auto Login feature, you can configure Lab Service to automatically log in to the testing host to run a test. The version of Lab Service you are running can also be viewed in the Lab Management Testing Hosts grid.
An open source Jenkins plugin has been developed that enables you to trigger a server side execution (functional test set or build verification suite) as a Jenkins build step. The results are reported in Jenkins and in the ALM Test Runs module. Support for this open source plugin is provided by the Jenkins community. For download and documentation, go to: https://wiki.jenkins-ci.org/display/JENKINS/HP+Application+Automation+Tools.

ALM Advisor
ALM Advisor helps you to better analyze your current ALM/QC Enterprise deployment, and provides tailored recommendations for improving your ALM/QC Enterprise configuration. Upload the data collected on your current environment to the HP ALM Advisor website.

ALM Help
The online help has a new Home page giving easier access to information on getting started with ALM, and key tasks. "Show Me How" movies have been added to demonstrate how to perform specific tasks. The search tab in the online help now includes a filter that enables you to limit your search to a specific book within the ALM Help.

Supported Environments
For the supported and recommended system configurations for your ALM server and client machine, refer to HP Software Support Online.

Integrations Matrix
ALM offers integration and synchronization solutions with HP and third-party tools. To integrate ALM with other tools, you may need to install an add-in. Refer to the Integrations Matrix to verify that you are using a supported version of the tool.

Business Views 
You can now create business view graphs based on single or multiple entities. ALM also provides a set of pre-defined business views that are fully customizable and can be continually edited according to your needs. For a movie on using Business Views

Project Reports 
Project reports can now be downloaded locally as .zip files. You can add existing graphs to the report, or create new graphs directly in the report. Pre-defined project reports can now be accessed from within the Requirements, Test Plan, Test Lab, Defects, and Business Components modules. For a movie on the new Project Reports functionality

Administration Updates
You can now run multiple side-by-side Site Admin clients. Additional enhancements include Unicode support for ALM projects on SQL Server, a modified Licenses tab and new Site Configuration parameters.

Business Process Testing
New features such as the Test Script Canvas, as well as general enhancements and enhancements to business component design have been introduced.
Optimized Project Repository
An optimized repository system for storing Project files ensures better performance for common actions, and extends the capacity of the file system.
Side-by-Side ALM Clients
You can now run multiple versions of HP Application Lifecycle Management (ALM) side-by-side on a workstation.

Business Process Model Integration 
You can now import business process models created in external model authoring tools, into the new Business Models module. A framework of requirements representing each model and activity is created automatically. You can also create test coverage and assess the quality of your business process models. For a movie on integrating business process models into the application lifecycle

Traceability Matrix 
The Traceability Matrix view in the Requirements module allows you to determine the extent of relationships between different requirements, and between requirements and tests. For a movie on creating a traceability matrix

Test Configurations 
Using the Test Configurations tab in the Test Plan module, you can now design tests that run according to different use-cases, each with different sets of data. For a movie on using Text Configurations, select HP ALM 11.00 on the Movies page and select the Data Awareness movie.

Project Reports
A new Project Report reporting tool is available in the Analysis View module. Project reports offer enhanced performance, rich style and layout options using MS Word templates, single configuration for multiple output formats (doc, docx, html, pdf), as well as centralized template management.

User Updates
Usability enhancements including a new module navigation sidebar, the ability to add subfolders to Favorites, as well as a Task Manager have been introduced. Enhancements have also been made to the Libraries, Requirements, Test Lab and Dashboard modules.

Session Reconnect
When your ALM session is inactive for a period of time, the session expires. Previously this required you to log out and log in again, which included reloading project customization. Now when your session expires, you are prompted to reconnect. If the project administrator has not made any significant changes to the project customization, the customization does not reload, enabling you to reconnect quickly and continue working where you left off.

Administration Updates
Administration enhancements have been introduced to project extensions, cross project customization, saving of customization changes and deactivation of users. A new internal monitoring tool - QC Sense - allows you to analyze ALM usage and performance data. Several new site configuration parameters and workflow event procedures have also been added.

Changes in Feature Availability
The following features are no longer supported: Creating WinRunner tests, visible fields (Add Defect dialog box), printing defects directly from the Defects grid, library broken links verification, fixed columns in Defects grid, automatically adding required fields to grid, resetting of existing user group permissions according to another group's permissions, and adding users from a project created in an earlier version without upgrading the project.

Business Process Testing 
New features and enhancements include improved performance when running QuickTest automated components, an enhanced user interface, application area improvements, test configurations that access static and dynamic data, the ability to define coverage by test criteria and enhanced HP Sprinter functionality for Business Process Testing. For movies on using Business Process Testing, select HP ALM 11.00 on the Movies page.

API and Database Updates
REST-based API has been added to provide a platform-independent way to access ALM data with HTTP applications and with a browser. New items have been added to the API and database references.