Blog to understand automation concepts in QTP, Selenium Webdriver and Manual Testing concepts

Understanding Object Repositories Manager: Managing Objects

1.  How to Import Object Repository from xml file


Object repository can be loaded from an external xml file using object repository manager.


Importing and exporting Object Repositories to/from xml file


2.  How to export Object Repository to a xml file


Object repository can be exported to an external file using object repository manager.


3. Defining Objects manually in object repository 


      A new test object can be added manually using object repository manager. Below are the steps to add object manually in the object repository

Adding Object manually in Object repository

  • Navigate to Resources>Object Repository Manager
  • Navigate to Object>Define New Test Objects
  • Define new test Object with environment, name, and class of object and add description properties to object.
  • Click on Add to add object.
  • Save object repository as shared object repository


4.       Add Object to repository

  • User can add an object from  application without recording
  • Navigate to Resources>Object Repository Manager.
  • Navigate to Object>Add Objects
  • Focus on object to be added and click.
  • Object is added to repository.


5.       Navigate and Learn

  • User can add required objects from application using Navigate and Learn.
  • Navigate to Resources>Object Repository Manager.
  • Navigate to Object>Navigate and Learn or press F6.
  • Define the filter for objects to be added.
  • Click on learn button.
  • Object will be added to object repository


·          
Options of Working with object

6.       Update Object from Application

  • User can update objects from application with below steps
  • Navigate to Resources>Object Repository Manager.
  • Select an object to be updated. Please note updated object class should be same as the class of object by which it is to be updated.
  • Navigate to Object>Update from application
  • Object properties are updated

How to integrate QTP 11 with Quality Center/ALM

HP ALM 11 or Quality Center is used as a test management tool in which we can store tests, function Libraries, test data, object repository, recovery scenario and much more. Below are some of the features in QTP required to connect to Quality Center and various options in QTP regarding QTP-QC Integration

Integration between QC and QTP

QTP can connect to a project stored in ALM through VBScript Code or through QTP IDE as explained below:

Through Code

Below code creates a connection to QC. This will validate if a connection to QC already exists and in case not connected than connects to the required project in QC

Public Functionfunc_ConnectQCQTP(QCurl,Domain,ProjectName,UserName,Password)

Set qtApp = CreateObject("QuickTest.Application") 

If  qtApp.launched <> True then 

    qtApp.Launch 

End If

qtApp.Visible = "true"

If Not qtApp.TDConnection.IsConnected Then

   qtApp.TDConnection.Connect QCurl,Domain,ProjectName,UserName,Password,False

End If

Set qtApp = nothing

End Function


Through QTP Interface


Go to File>ALM/QC Connection as shown below and create the connection.

Connecting to QC from QTP



Connecting to QC from QTP

User is allowed options to reconnect to the QC Server, and authenticate on start up and login to project automatically once QTP is launched.

Version Control in QC


In case of test stored in QC,version controlling the test script is very useful,so that test can be open by one user at a time and previous versions of test are available and can revert to previous version in case of issues. In case of version control, a test will open in read only mode and changes in script can be done only post checking out the script, and once changes are incorporated, changes should be checked in.



Priniciple of Software Testing and Difference between QC and QA

Basics of Testing

Testing is a quality control activity with objectives as finding defects, gaining confidence on the quality of products and preventing defect. Testing should start as early as possible and should be planned for different phases of software life cycle. Early detection of defects reduces the cost of fixing defects.

Principles of Testing

Below are the principles of testing which should be taken into consideration while performing testing:

  • Testing shows presence of defect but we cannot ensure there are no defects in the system. The reason for this is described in next principle
  • Exhaustive testing is not possible as covering all combination of data and scenario is not feasible as it will take lot of cost and resources & time.
  • Testing Activity should start as soon as possible. This will result in defect fixed with less effort in development and development can more easily accommodate the changes in early phases than latter.
  • So now the question arises, which things to test first. Most of the defects are concentrated to small number of modules, which is defect clustering. So we need to concentrate more on modules more prone to defects.
  • Next test case needs to be updated regularly to avoid pesticide paradox i.e same test cases if executed again and again will not be able to find more defects.
  • Testing should be context sensitive, i.e before considering testing, we should take into consideration the impact and importance area of the application
  • And finally the product delivered and tested should match the client expectation, and is no purpose even if no defect is found, but product does not fulfill client requirement.

    

 Quality Control and Quality Assurance


Last point in the Testing principles mentions the product delivered to the customer should be quality product. To ensure quality of the product, we must follow quality assurance and quality control activities.

Quality Assurance ensures proper quality processes are followed during product development .For example. There are regular audits, inspections, review activities, estimations, testing process standards during the software life cycle to assure the quality of product.

Quality Control is the testing activities in which product quality is compared with expected standards and issue is raised in case of defects or non conformance being encountered.

Some of the most important Quality Factors are Correctness, Reliability, Efficiency, Integrity, Usability, Maintainability, Reusability, and portability.