Friday, 9 August 2013

How to Capture Date Using QTP on a Sharepoint Application

Map the inner text value with the Environment. I had mapped it with Environment “text”
Code is as follows -
‘Clicking the main link
Environment.value(”text”)=”January 2012″
Browser(”Abu Dhabi Securities Exchange”).Page(”Abu Dhabi Securities Exchange”).Link(”March 2012″).Object.click()
Selecting the year
Environment.value(”text”)=”2011″
Browser(”Abu Dhabi Securities Exchange”).Page(”Abu Dhabi Securities Exchange”).WebElement(”year”).Object.click()
‘Selecting the month
Environment.value(”text”)=”Jul”
Browser(”Abu Dhabi Securities Exchange”).Page(”Abu Dhabi Securities Exchange”).WebElement(”Month”).Object.click()
Browser(”Abu Dhabi Securities Exchange”).Page(”Abu Dhabi Securities Exchange”).WebButton(”Apply”).Object.click()
‘Selecting the date
Environment.value(”text”)=”12″
Browser(”Abu Dhabi Securities Exchange”).Page(”Abu Dhabi Securities Exchange”).Link(”16″).Object.click()

How to Go Full Screen on Windows

Open any photo in Windows Explorer, or open a photo or video clip in Windows Media Player. Do one of the following:
In Windows 7 and Windows XP, click the F11 key at the top of your keyboard.
The photo or video image enlarges to its maximum size and the title bar and taskbar are hidden.

What is Fault, Error, Detector, Failure, Exception

Fault – A fault is the origin of any misbehavior. It is the adjudged or hypothesized cause of an error.
Error – This is the part of a system state that is liable to lead to a failure. With respect to a fault it is a manifestation of a fault in a system. User errors are not part of the above error-definition. A user error is a mistake made by a user when operating a software system. The system is able to react to these mistakes, because it is designed to expect such situations and it is a part of the required functionality. The handling of those situations, which of course can be abnormal, should be treated in the user interface component of the system. In contrast to an error, a user error cannot result in a system crash, but like a system error, a user error normally can result in an exception raised by a system component.
Failure – A failure is a deviation of the delivered service from compliance with the specification. Whereas an error characterizes a particular state of a system, a failure is a particular event namely the transition from correct service delivery to incorrect service.
Detector – Before software can react to any error, it has to detect one first. If we look at the error handling as a separate software system, errors and failures of an application are the phenomena the error handling system observes. Thus a detector is the interface between the error and failures happening outside and their internal handling. The number, place and kind of detectors have great impact on the quality of an error handling system.
Exception – Generally, any occurrence of an abnormal condition that causes an interruption in normal control flow is called an exception. It is said that an exception is raised (thrown) when such a condition is signaled by a software unit. In response to an exception, the control is immediately given to a designated handler for the exception, which reacts to that situation (exception handler). The handler can try to recover from that exception in order to continue at a predefined location or it cleans up the environment and further escalates the exception. To raise an exception, a program first has to detect an error or failure

How to Test Payment Gateway in E-commerce Website

In a typical E-commerce website,one should look for following -
  • Error codes, every transaction type has error codes which are returned from Gateway. Get the list of error codes from development team and the requirements on how to handle each code from business. It will make majority of your test scenarios.
  • Network errors, latency, timeouts. Use this to make sure that in such cases customer is not charged or appropriate messages are returned from gateway.
  • Card numbers always follow Luhn’s algorithm. Try to check your application for proper handling of invalid card numbers.
  • When you hit a gateway your application transfers the user session to a different server. You can check timeouts, session integrity and similar things during this transition phase.
You should put permutation and combination for valid and invalid scearnio upon these variables -
1. Card Number
2. Expiry Date
3. CVV number
4. Billing Details
5. Refund to customer
6. Transaction successful on payment side but not on application side like while booking IRCTC tickets 
    sometimes you are charged but ticket is not booked
7. Security Questions (Pass/Fail)
8. Blocked Card

How to Do Google Analytics Testing

1. You need to create one account on http://www.google.com/analytics/ and provide your application URL and other details.
2. Once you create account, it provides you unique tracking id. (Tracking is with some code as similar given below). Copy that code, then paste it onto every page you want to track immediately before the closing tag.
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29620831-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement(’script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (’https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(’script’)[0]; s.parentNode.insertBefore(ga, s);
})();
3. After that you can track access count of web pages in your Google analytics account.