Archive for September, 2007
Web service Testing
Web Services Testing
This document provides an overview of what are web services? How they can be tested? What tools can be used for Functional as well as for Performance Testing of Web Services? What are the uses of Web Services?
What are web services?
Web services are a new breed of Web application. They are self-contained, self-describing, modular applications that can be published, located, and invoked across the Web. Web services perform functions, which can be anything from simple requests to complicated business processes…Once a Web service is deployed, other applications (and other Web services) can discover and invoke the deployed service. The full-function web services platform can be thought of as XML, HTTP, SOAP, WSDL and UDDI. At higher levels, one might also add technologies such as XAML, XLANG, XKMS, and XFS — services that are not universally accepted as mandatory. SOAP (Simple Object Access Protocol) is a protocol specification that defines a uniform way of passing XML-encoded data. It also defines a way to perform remote procedure calls (RPCs) using HTTP as the underlying communication protocol. UDDI (Universal Description, Discovery and Integration Service) provides a mechanism for clients to dynamically find other web services. Using a UDDI interface, businesses can dynamically connect to services provided by external business partners. A UDDI registry is similar to a CORBA trader, or it can be thought of as a DNS service for business applications. Web Services Description Language (WSDL) is a new specification to describe networked XML-based services. It provides a simple way for service providers to describe the basic format of requests to their systems regardless of the underlying protocol (such as Simple Object Access Protocol or XML) or encoding (such as Multipurpose Internet Messaging Extensions). WSDL is a key part of the effort of the Universal Description, Discovery and Integration (UDDI) initiative to provide directories and descriptions of such on-line services for electronic business. WSDL (Web Services Definition Language) provides a way for service providers to describe the basic format of web service requests over different protocols or encodings. WSDL is used to describe what a web service can do, where it resides, and how to invoke it.
Web Service Architecture
The following illustration shows the relationship between a Web service (in the center), its client software applications (on the left), and the resources it uses, including databases, other Web services, and so on (on the right). A Web service communicates with clients and resources over standard protocols such as HyperText Transfer Protocol (HTTP) by exchanging XML messages. The WebLogic Server on which the Web service is deployed is responsible for routing incoming XML messages to the Web service code that you write. The Web service exports a Web Service Description Language (WSDL) file to describe its interface, which other developers may use to write components to access the service.
How to do Functional Testing?
The goal of this testing is fairly straightforward: to ensure that the server delivers appropriate responses for the given requests. However, due to the complexity of Web services, this task is far from simple. With most Web services, it is impossible to anticipate exactly what types of requests clients will send. Enumerating all possible requests is not feasible because the space of possible inputs is either unbounded or intractably large. As a result, it is important to verify whether the server can handle a wide range of request types and parameters. There are several tools available in the market to user for functionality testing. We practically tried one such tool, which is freeware, called Exactor.
About Exactor
Exactor is a framework for writing automated acceptance tests of the kind advocated by Extreme Programming. Customers or testers write acceptance tests using a simple plain text format. Programmers write the commands specified by the customer tests and connect them to the application being tested. The format for Exactor test scripts is plain ASCII text. A script is a series of commands that are interpreted by the framework to invoke Java classes written by programmers to carry out the command. Lines beginning with the hash character '#’ are comments and are ignored by the framework. Commands are specified one per line starting at the left hand side of the script; any parameters required by the command are supplied next, separated by white space, i.e. spaces or tabs. The script should be saved with an extension of “.act”, although not strictly necessary it enables the script runner to pick up multiple files in a directory. It supports Batch testing. To run the script or multiple scripts in a directory, run the framework class passing the name of the file or directory as an argument
How to do Performance Testing?
Performance testing is an important part of any distributed or Web application testing plan. Inclusion of performance estimates into planning and development cycles ensures that the application delivered to a customer satisfies high load, availability and scalability requirements. This type of test not only provides an absolute measure of system response time, but also targets the regressions on server and application code, examines if the response from the server matches the expected result, and helps to evaluate and compare middleware solutions from different vendors.
About JMeter
Apache JMeter is a tool that can be used to test applications utilizing HTTP or FTP servers. It is Java based and is highly extensible through a provided API. A typical JMeter test involves creating a loop and a thread group. The loop simulates sequential requests to the server with a preset delay. A thread group is designed to simulate a concurrent load. JMeter provides a user interface. It also exposes an API that allows you to run JMeter-based tests from a Java application. To create a load test in JMeter build a test plan, which is essentially a sequence of operations JMeter will execute. The simplest test plan normally includes the following elements:
· Thread group – These elements are used to specify number of running threads and a ramp-up period. Each thread simulates a user and the ramp-up period specifies the time to create all the threads. For example with 5 threads and 10 seconds of ramp-up time, it will take 2 seconds between each thread creation. The loop count defines the running time for a thread. The scheduler also allows you to set the start and end of the run time.
· Samplers – These elements are configurable requests to the server HTTP, FTP, or LDAP requests. This tutorial focuses on the Web service requests only.
· Listeners – These elements are used to post process request data. For example, you can save data to a file or illustrate the results with a chart. At the moment the JMeter chart does not provide many configuration options; however it is extensible and it is always possible to add an extra visualization or data processing module.
What are the uses of Web Services?
The following characteristics of Web services make them well suited for creating integrated systems on the Internet or intranets.
ReusableJust like other component technologies, once you have written code and exposed it as a Web service, you or others may use that code again and again from various applications. Once you’ve written and tested your code, it’s easy to make use of it in new applications. Because Web services use standard XML protocols, these components can be consumed by a much wider variety of users than with previous component based technologies.
Flexible
Because Web services communicate using extensible XML documents (instead of small pieces of data), they can more easily accommodate changing data and content over time. This also encourages packaging may activities into a single method call over the network. This greatly improves the efficiency of your applications, especially over high-latency networks such as the Internet or corporate WANs (Wide Area Networks).
Standards-Based
Web services are built on standard technologies such as HTTP and XML. All Web service messages are exchanged using a standard XML messaging protocol known as SOAP (Simple Object Access Protocol), and Web service interfaces are described using documents in the WSDL (Web Services Description Language) standard. These standards are all completely agnostic of the platform on which the Web services were built.
Implement SOA
Web services, is one of the ways you can implement SOA. The benefit of implementing SOA with Web services is that you achieve a platform-neutral approach to accessing services and better interoperability as more and more vendors support more and more Web services specifications. Note: The Tools specified here are the freeware tools available on internet at free of cost. There are several tools available in the market which can make your work easier. They are specified just for examples only.
Add comment September 24, 2007
Manual Testing Faqs
What is ‘Software Quality Assurance’?
1)Software QA involves the entire software development PROCESS 2) monitoring and improving the process,3) standards and procedures are followed4) ensuring that problems are found and dealt with. It is oriented to ‘prevention’.
What is ‘Software Testing’?
Testing involves operation of a system or application under controlled conditions and evaluating the results (e.g., ‘if the user is in interface A of the application while using hardware B, and does C, then D should happen’). The controlled conditions should include both normal and abnormal conditions. Testing should intentionally attempt to make things go wrong to determine if things happen when they shouldn’t or things don’t happen when they should. It is oriented to ‘detection’.
Why does software have bugs?
· Miscommunication or no communication
· Software complexity
· Programming errors
· Changing requirements · time pressures · egos · poorly documented code ·
What is Verification?
“Verification” checks whether we are building the right system, and Verification typically involves reviews and meetings to evaluate documents, plans, code, requirements, and specifications. This can be done with checklists, issues lists, walkthroughs, and inspection meetings.
What is Validation?
“Validation” checks whether we are building the system right. Validation typically involves actual testing and takes place after verifications are completed.
What is a ‘walkthrough’?
A ‘walkthrough’ is an informal meeting for evaluation or informational purposes. Little or no preparation is usually required.
What’s an ‘inspection’? An inspection is more formalized than a ‘walkthrough’, typically with 3-8 people including a moderator, reader (the author of whatever is being reviewed), and a recorder to take notes. The subject of the inspection is typically a document such as a requirements spec or a test plan, and the purpose is to find problems and see what’s missing, not to fix anything. Attendees should prepare for this type of meeting by reading thru the document; most problems will be found during this preparation. The result of the inspection meeting should be a written report. Thorough preparation for inspections is difficult, painstaking work, but is one of the most cost-effective methods of ensuring quality. Employees who are most skilled at inspections are like the ‘eldest brother’ in the parable in ‘Why is it often hard for management to get serious about quality assurance? Their skill may have low visibility but they are extremely valuable to any software development organization, since bug prevention is far more cost effective than bug detection.
What kinds of testing should be considered?
· Black box testing – not based on any knowledge of internal design or code. Tests are based on requirements and functionality.
· White box testing – based on knowledge of the internal logic of an application’s code. Tests are based on coverage of code statements, branches, paths, conditions.
· Unit testing – the most ‘micro‘ scale of testing; to test particular functions or code modules. Typically done by the programmer and not by testers, as it requires detailed knowledge of the internal program design and code. Not always easily done unless the application has a well-designed architecture with tight code, may require developing test driver modules or test harnesses.
· Incremental integration testing - continuous testing of an application as new functionality is added; requires that various aspects of an application’s functionality be independent enough to work separately before all parts of the program are completed, or that test drivers be developed as needed; done by programmers or by testers.
· Integration testing – testing of combined parts of an application to determine if they function together correctly. The ‘parts’ can be code modules, individual applications, client and server applications on a network, etc. This type of testing is especially relevant to client/server and distributed systems.
· Functional testing – Black box type testing geared to functional requirements of an application; this type of testing should be done by testers. This doesn’t mean that the programmers shouldn’t check that their code works before releasing it (which of course applies to any stage of testing.)
· System testing - Black box type testing that is based on overall requirements specifications; covers all combined parts of a system.
· end-to-end testing – similar to system testing; the ‘macro’ end of the test scale; involves testing of a complete application environment in a situation that mimics real-world use, such as interacting with a database, using network communications, or interacting with other hardware, applications, or systems if appropriate.
· Sanity testing – typically an initial testing effort to determine if a new software version is performing well enough to accept it for a major testing effort. For example, if the new software is crashing systems every 5 minutes, bogging down systems to a crawl, or destroying databases, the software may not be in a ’sane’ enough condition to warrant further testing in its current state.
· regression testing – re-testing after fixes or modifications of the software or its environment. It can be difficult to determine how much re-testing is needed, especially near the end of the development cycle. Automated testing tools can be especially useful for this type of testing.
· acceptance testing – final testing based on specifications of the end-user or customer, or based on use by end-users/customers over some limited period of time.
· load testing - testing an application under heavy loads, such as testing of a web site under a range of loads to determine at what point the system’s response time degrades or fails. · stress testing – term often used interchangeably with ‘load’ and ‘performance’ testing. Also used to describe such tests as system functional testing while under unusually heavy loads, heavy repetition of certain actions or inputs, input of large numerical values, large complex queries to a database system, etc.
· Performance testing – term often used interchangeably with ’stress’ and ‘load’ testing. Ideally ‘performance’ testing (and any other ‘type’ of testing) is defined in requirements documentation or QA or Test Plans.
· Usability testing - testing for ‘user-friendliness’. Clearly this is subjective, and will depend on the targeted end-user or customer. User interviews, surveys, video recording of user sessions, and other techniques can be used. Programmers and testers are usually not appropriate as usability testers.
· Install/uninstall testing – testing of full, partial, or upgrade install/uninstall processes. · Recovery testing – testing how well a system recovers from crashes, hardware failures, or other catastrophic problems.
· Security testing – testing how well the system protects against unauthorized internal or external access, willful damage, etc; may require sophisticated testing techniques.
· Compatability testing – testing how well software performs in a particular hardware/software/operating system/network/etc. environment.
· Exploratory testing – often taken to mean a creative, informal software test that is not based on formal test plans or test cases; testers may be learning the software as they test it. · Ad-hoc testing – similar to exploratory testing, but often taken to mean that the testers have significant understanding of the software before testing it.
· User acceptance testing – determining if software is satisfactory to an end-user or customer.
· Comparison testing – comparing software weaknesses and strengths to competing products.
· Alpha testing – testing of an application when development is nearing completion; minor design changes may still be made as a result of such testing. Typically done by end-users or others, not by programmers or testers.
· Beta testing – testing when development and testing are essentially completed and final bugs and problems need to be found before final release. Typically done by end-users or others, not by programmers or testers.
· Mutation testing – a method for determining if a set of test data or test cases is useful, by deliberately introducing various code changes (‘bugs’) and retesting with the original test data/cases to determine if the ‘bugs’ are detected. Proper implementation requires large
What is SEI? CMM? ISO? IEEE? ANSI? Will it help? · SEI = ‘Software Engineering Institute’ at Carnegie-Mellon University; initiated by the U.S. Defense Department to help improve software development processes. · CMM = ‘Capability Maturity Model’, developed by the SEI. It’s a model of 5 levels of organizational ‘maturity’ that determine effectiveness in delivering quality software. It is geared to large organizations such as large U.S. Defense Department contractors. However, many of the QA processes involved are appropriate to any organization, and if reasonably applied can be helpful. Organizations can receive CMM ratings by undergoing assessments by qualified auditors. Level 1 – Level 2 – Level 3 - Level 4 - Level 5 – (Perspective on CMM ratings: During 1992-1996 533 organizations were assessed. Of those, 62% were rated at Level 1, 23% at 2,13% at 3, 2% at 4, and 0.4% at 5. The median size of organizations was 100 software engineering/maintenance personnel; 31% of organizations were U.S. federal contractors. For those rated at Level 1, the most problematical key process area was in Software Quality Assurance.) · ISO = ‘International Organization for Standards’ – The ISO 9001, 9002, and 9003 standards concern quality systems that are assessed by outside auditors, and they apply to many kinds of production and manufacturing organizations, not just software. The most comprehensive is 9001, and this is the one most often used by software development organizations. It covers documentation, design, development, production, testing, installation, servicing, and other processes. ISO 9000-3 (not the same as 9003) is a guideline for applying ISO 9001 to software development organizations. The U.S. version of the ISO 9000 series standards is exactly the same as the international version, and is called the ANSI/ASQ Q9000 series. The U.S. version can be purchased directly from the ASQ (American Society for Quality) or the ANSI organizations. To be ISO 9001 certified, a third-party auditor assesses an organization, and certification is typically good for about 3 years, after which a complete reassessment is required. Note that ISO 9000 certification does not necessarily indicate quality products – it indicates only that documented processes are followed. (Publication of revised ISO standards are expected in late 2000; see http://www.iso.ch/ for latest info.) · IEEE = ‘Institute of Electrical and Electronics Engineers’ – among other things, creates standards such as ‘IEEE Standard for Software Test Documentation’ (IEEE/ANSI Standard 829), ‘IEEE Standard of Software Unit Testing (IEEE/ANSI Standard 1008), ‘IEEE Standard for Software Quality Assurance Plans’ (IEEE/ANSI Standard 730), and others. · ANSI = ‘American National Standards Institute’, the primary industrial standards body in the U.S.; publishes some software-related standards in conjunction with the IEEE and ASQ (American Society for Quality).
What is the ’software life cycle’? The life cycle begins when an application is first conceived and ends when it is no longer in use. It includes aspects such as initial concept, requirements analysis, functional design, internal design, documentation planning, test planning, coding, document preparation, integration, testing, maintenance, updates, retesting, phase-out, and other aspects.
What makes a good test engineer?
A good test engineer has a ‘test to break’ attitude, an ability to take the point of view of the customer, a strong desire for quality, and an attention to detail. Tact and diplomacy are useful in maintaining a cooperative relationship with developers, and an ability to communicate with both technical (developers) and non-technical (customers, management) people is useful. Previous software development experience can be helpful as it provides a deeper understanding of the software development process, gives the tester an appreciation for the developers’ point of view, and reduce the learning curve in automated test tool programming. Judgement skills are needed to assess high-risk areas of an application on which to focus testing efforts when time is limited.
What makes a good Software QA engineer?
The same qualities a good tester has are useful for a QA engineer. Additionally, they must be able to understand the entire software development process and how it can fit into the business approach and goals of the organization. Communication skills and the ability to understand various sides of issues are important. In organizations in the early stages of implementing QA processes, patience and diplomacy are especially needed. An ability to find problems as well as to see ‘what’s missing’ is important for inspections and reviews.
What’s the role of documentation in QA?
Critical. (Note that documentation can be electronic, not necessarily paper.) QA practices should be documented such that they are repeatable. Specifications, designs, business rules, inspection reports, configurations, code changes, test plans, test cases, bug reports, user manuals, etc. should all be documented. There should ideally be a system for easily finding and obtaining documents and determining what documentation will have a particular piece of information. Change management for documentation should be used if possible.
What’s the big deal about ‘requirements’?
One of the most reliable methods of insuring problems, or failure, in a complex software project is to have poorly documented requirements specifications. Requirements are the details describing an application’s externally-perceived functionality and properties. Requirements should be clear, complete, reasonably detailed, cohesive, attainable, and testable. A non-testable requirement would be, for example, ‘user-friendly’ (too subjective). A testable requirement would be something like ‘the user must enter their previously-assigned password to access the application’. Determining and organizing requirements details in a useful and efficient way can be a difficult effort; different methods are available depending on the particular project. Many books are available that describe various approaches to this task. (See the Bookstores section’s ‘Software Requirements Engineering’ category for books on Software Requirements.) Care should be taken to involve ALL of a project’s significant ‘customers’ in the requirements process. ‘Customers’ could be in-house personnel or out, and could include end-users, customer acceptance testers, customer contract officers, customer management, future software maintenance engineers, salespeople, etc. Anyone who could later derail the project if their expectations aren’t met should be included if possible. Organizations vary considerably in their handling of requirements specifications. Ideally, the requirements are spelled out in a document with statements such as ‘The product shall…’ ‘Design’ specifications should not be confused with ‘requirements’; design specifications should be traceable back to the requirements. In some organizations requirements may end up in high level project plans, functional specification documents, in design documents, or in other documents at various levels of detail. No matter what they are called, some type of documentation with detailed requirements will be needed by testers in order to properly plan and execute tests. Without such documentation, there will be no clear-cut way to determine if a software application is performing correctly.
What’s a ‘test plan’?
A software project test plan is a document that describes the objectives, scope, approach, and focus of a software testing effort. The process of preparing a test plan is a useful way to think through the efforts needed to validate the acceptability of a software product. The completed document will help people outside the test group understand the ‘why’ and ‘how’ of product validation. It should be thorough enough to be useful but not so thorough that no one outside the test group will read it. The following are some of the items that might be included in a test plan, depending on the particular project.
What’s a ‘test case’?
· A test case is a document that describes an input, action, or event and an expected response, to determine if a feature of an application is working correctly. A test case should contain particulars such as test case identifier, test case name, objective, test conditions/setup, input data requirements, steps, and expected results. · Note that the process of developing test cases can help find problems in the requirements or design of an application, since it requires completely thinking through the operation of the application. For this reason, it’s useful to prepare test cases early in the development cycle if possible.
What should be done after a bug is found?The bug needs to be communicated and assigned to developers that can fix it. After the problem is resolved, fixes should be re-tested, and determinations made regarding requirements for regression testing to check that fixes didn’t create problems elsewhere. If a problem-tracking system is in place, it should encapsulate these processes. A variety of commercial problem-tracking/management software tools are available (see the ‘Tools’ section for web resources with listings of such tools). The following are items to consider in the tracking process: · Complete information such that developers can understand the bug, get an idea of it’s severity, and reproduce it if necessary. · Bug identifier (number, ID, etc.) · Current bug status (e.g., ‘Released for Retest’, ‘New’, etc.) · The application name or identifier and version · The function, module, feature, object, screen, etc. where the bug occurred · Environment specifics, system, platform, relevant hardware specifics · Test case name/number/identifier · One-line bug description · Full bug description · Description of steps needed to reproduce the bug if not covered by a test case or if the developer doesn’t have easy access to the test case/test script/test tool · Names and/or descriptions of file/data/messages/etc. used in test · File excerpts/error messages/log file excerpts/screen shots/test tool logs that would be helpful in finding the cause of the problem · Severity estimate (a 5-level range such as 1-5 or ‘critical’-to-’low’ is common) · Was the bug reproducible? · Tester name · Test date · Bug reporting date · Name of developer/group/organization the problem is assigned to · Description of problem cause · Description of fix · Code section/file/module/class/method that was fixed · Date of fix · Application version that contains the fix · Tester responsible for retest · Retest date · Retest results · Regression testing requirements · Tester responsible for regression tests · Regression testing results A reporting or tracking process should enable notification of appropriate personnel at various stages. For instance, testers need to know when retesting is needed, developers need to know when bugs are found and how to get the needed information, and reporting/summary capabilities are needed for managers.
What is ‘configuration management’?
Configuration management covers the processes used to control, coordinate, and track: code, requirements, documentation, problems, change requests, designs, tools/compilers/libraries/patches, changes made to them, and who makes the changes. (See the ‘Tools’ section for web resources with listings of configuration management tools. Also see the Bookstores section’s ‘Configuration Management’ category for useful books with more information.)
What if the software is so buggy it can’t really be tested at all?
The best bet in this situation is for the testers to go through the process of reporting whatever bugs or blocking-type problems initially show up, with the focus being on critical bugs. Since this type of problem can severely affect schedules, and indicates deeper problems in the software development process (such as insufficient unit testing or insufficient integration testing, poor design, improper build or release procedures, etc.) managers should be notified, and provided with some documentation as evidence of the problem.
How can it be known when to stop testing?
This can be difficult to determine. Many modern software applications are so complex, and run in such an interdependent environment, that complete testing can never be done. Common factors in deciding when to stop are: · Deadlines (release deadlines, testing deadlines, etc.) · Test cases completed with certain percentage passed · Test budget depleted · Coverage of code/functionality/requirements reaches a specified point · Bug rate falls below a certain level · Beta or alpha testing period ends
What if there isn’t enough time for thorough testing?
Use risk analysis to determine where testing should be focused.Since it’s rarely possible to test every possible aspect of an application, every possible combination of events, every dependency, or everything that could go wrong, risk analysis is appropriate to most software development projects. This requires judgement skills, common sense, and experience. (If warranted, formal methods are also available.) Considerations can include: · Which functionality is most important to the project’s intended purpose? · Which functionality is most visible to the user? · Which functionality has the largest safety impact? · Which functionality has the largest financial impact on users? · Which aspects of the application are most important to the customer? · Which aspects of the application can be tested early in the development cycle? · Which parts of the code are most complex, and thus most subject to errors? · Which parts of the application were developed in rush or panic mode? · Which aspects of similar/related previous projects caused problems? · Which aspects of similar/related previous projects had large maintenance expenses? · Which parts of the requirements and design are unclear or poorly thought out? · What do the developers think are the highest-risk aspects of the application? · What kinds of problems would cause the worst publicity? · What kinds of problems would cause the most customer service complaints? · What kinds of tests could easily cover multiple functionalities? · Which tests will have the best high-risk-coverage to time-required ratio? ·
What if the project isn’t big enough to justify extensive testing?
Consider the impact of project errors, not the size of the project. However, if extensive testing is still not justified, risk analysis is again needed and the same considerations as described previously in ‘What if there isn’t enough time for thorough testing?’ apply. The tester might then do ad hoc testing, or write up a limited test plan based on the risk analysis.
What can be done if requirements are changing continuously? A common problem and a major headache. · Work with the project’s stakeholders early on to understand how requirements might change so that alternate test plans and strategies can be worked out in advance, if possible. · It’s helpful if the application’s initial design allows for some adaptability so that later changes do not require redoing the application from scratch. · If the code is well-commented and well-documented this makes changes easier for the developers. · Use rapid prototyping whenever possible to help customers feel sure of their requirements and minimize changes. · The project’s initial schedule should allow for some extra time commensurate with the possibility of changes. · Try to move new requirements to a ‘Phase 2′ version of an application, while using the original requirements for the ‘Phase 1′ version. · Negotiate to allow only easily-implemented new requirements into the project, while moving more difficult new requirements into future versions of the application. · Be sure that customers and management understand the scheduling impacts, inherent risks, and costs of significant requirements changes. Then let management or the customers (not the developers or testers) decide if the changes are warranted – after all, that’s their job. · Balance the effort put into setting up automated testing with the expected effort required to re-do them to deal with changes. · Try to design some flexibility into automated test scripts. · Focus initial automated testing on application aspects that are most likely to remain unchanged. · Devote appropriate effort to risk analysis of changes to minimize regression testing needs. · Design some flexibility into test cases (this is not easily done; the best bet might be to minimize the detail in the test cases, or set up only higher-level generic-type test plans) · Focus less on detailed test plans and test cases and more on ad hoc testing (with an understanding of the added risk that this entails).
What if the application has functionality that wasn’t in the requirements? It may take serious effort to determine if an application has significant unexpected or hidden functionality, and it would indicate deeper problems in the software development process. If the functionality isn’t necessary to the purpose of the application, it should be removed, as it may have unknown impacts or dependencies that were not taken into account by the designer or the customer. If not removed, design information will be needed to determine added testing needs or regression testing needs. Management should be made aware of any significant added risks as a result of the unexpected functionality. If the functionality only effects areas such as minor improvements in the user interface, for example, it may not be a significant risk. How can Software QA processes be implemented without stifling productivity?By implementing QA processes slowly over time, using consensus to reach agreement on processes, and adjusting and experimenting as an organization grows and matures, productivity will be improved instead of stifled. Problem prevention will lessen the need for problem detection, panics and burn-out will decrease, and there will be improved focus and less wasted effort. At the same time, attempts should be made to keep processes simple and efficient, minimize paperwork, promote computer-based processes and automated tracking and reporting, minimize time required in meetings, and promote training as part of the QA process. However, no one – especially talented technical types – likes rules or bureacracy, and in the short run things may slow down a bit. A typical scenario would be that more days of planning and development will be needed, but less time will be required for late-night bug-fixing and calming of irate customers. What if an organization is growing so fast that fixed QA processes are impossible?This is a common problem in the software industry, especially in new technology areas. There is no easy solution in this situation, other than: · Hire good people · Management should ‘ruthlessly prioritize’ quality issues and maintain focus on the customer · Everyone in the organization should be clear on what ‘quality’ means to the customer
How does a client/server environment affect testing?Client/server applications can be quite complex due to the multiple dependencies among clients, data communications, hardware, and servers. Thus testing requirements can be extensive. When time is limited (as it usually is) the focus should be on integration and system testing. Additionally, load/stress/performance testing may be useful in determining client/server application limitations and capabilities. There are commercial tools to assist with such testing.
How can World Wide Web sites be tested?Web sites are essentially client/server applications – with web servers and ‘browser’ clients. Consideration should be given to the interactions between html pages, TCP/IP communications, Internet connections, firewalls, applications that run in web pages (such as applets, javascript, plug-in applications), and applications that run on the server side (such as cgi scripts, database interfaces, logging applications, dynamic page generators, asp, etc.). Additionally, there are a wide variety of servers and browsers, various versions of each, small but sometimes significant differences between them, variations in connection speeds, rapidly changing technologies, and multiple standards and protocols. The end result is that testing for web sites can become a major ongoing effort. Other considerations might include: · What are the expected loads on the server (e.g., number of hits per unit time?), and what kind of performance is required under such loads (such as web server response time, database query response times). What kinds of tools will be needed for performance testing (such as web load testing tools, other tools already in house that can be adapted, web robot downloading tools, etc.)? · Who is the target audience? What kind of browsers will they be using? What kind of connection speeds will they by using? Are they intra- organization (thus with likely high connection speeds and similar browsers) or Internet-wide (thus with a wide variety of connection speeds and browser types)? · What kind of performance is expected on the client side (e.g., how fast should pages appear, how fast should animations, applets, etc. load and run)? · Will down time for server and content maintenance/upgrades be allowed? how much? · What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested? · How reliable are the site’s Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing? · What processes will be required to manage updates to the web site’s content, and what are the requirements for maintaining, tracking, and controlling page content, graphics, links, etc.? · Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers? · Will there be any standards or requirements for page appearance and/or graphics throughout a site or parts of a site?? · How will internal and external links be validated and updated? how often? · Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet ‘traffic congestion’ problems to be accounted for in testing? · How extensive or customized are the server logging and reporting requirements; are they considered an integral part of the system and do they require testing? · How are cgi programs, applets, javascripts, ActiveX components, etc. to be maintained, tracked, controlled, and tested? Some sources of site security information include the Usenet newsgroup ‘comp.security.announce’ and links concerning web site security in the ‘Other Resources’ section. Some usability guidelines to consider – these are subjective and may or may not apply to a given situation (Note: more information on usability testing issues can be found in articles about web site usability in the ‘Other Resources’ section): · Pages should be 3-5 screens max unless content is tightly focused on a single topic. If larger, provide internal links within the page. · The page layouts and design elements should be consistent throughout a site, so that it’s clear to the user that they’re still within a site. · Pages should be as browser-independent as possible, or pages should be provided or generated based on the browser-type. · All pages should have links external to the page; there should be no dead-end pages. · The page owner, revision date, and a link to a contact person or organization should be included on each page. Many new web site test tools are appearing and more than 180 of them are listed in the ‘Web Test Tools’ section.
How is testing affected by object-oriented designs? Well-engineered object-oriented design can make it easier to trace from code to internal design to functional design to requirements. While there will be little affect on black box testing (where an understanding of the internal design of the application is unnecessary), white-box testing can be oriented to the application’s objects. If the application was well-designed this can simplify test design.
What is Extreme Programming and what’s it got to do with testing?
Extreme Programming (XP) is a software development approach for small teams on risk-prone projects with unstable requirements. It was created by Kent Beck who described the approach in his book ‘Extreme Programming Explained’ (See the Softwareqatest.com Books page.). Testing (‘extreme testing’) is a core aspect of Extreme Programming. Programmers are expected to write unit and functional test code first – before the application is developed. Test code is under source control along with the rest of the code. Customers are expected to be an integral part of the project team and to help develope scenarios for acceptance/black box testing. Acceptance tests are preferably automated, and are modified and rerun for each of the frequent development iterations. QA and test personnel are also required to be an integral part of the project team. Detailed requirements documentation is not used, and frequent re-scheduling, re-estimating, and re-prioritizing is expected. For more info see the XP-related listings in the Softwareqatest.com ‘Other Resources’ section. Test Life Cycle · Identify Test Candidates
- Test Plan
- Design Test Cases
- Execute Tests
- Evaluate Results
- Document Test Results
- Casual Analysis/ Preparation of Validation Reports
- Regression Testing / Follow up on reported bugs.
Glass Box Testing
Test case selection that is based on an analysis of the internal structure of the component.Testing by looking only at the code. Sometimes also called “Code Based Testing”. Obviously you need to be a programmer and you need to have the source code to do this.
Test Case
A set of inputs, execution preconditions, and expected outcomes developed for a particular objective, such as to exercise a particular program path or to verify compliance with a specific requirement.
Operational Testing
Testing conducted to evaluate a system or component in its operational environment.
Validation
Determination of the correctness of the products of software development with respect to the user needs and requirements.
Verification
The process of evaluating a system or component to determine whether the products of the given development phase satisfy the conditions imposed at the start of that phase.
Control Flow
An abstract representation of all possible sequences of events in a program’s execution.
CAST
Acronym for computer-aided software testing.
Metrics
Ways to measure: e.g., time, cost, customer satisfaction, quality.
1 comment September 24, 2007
Important Questions in QTP
Q. Explain QTP testing process? A) The Quick Test testing process consists of 6 main phases:
1. Create your test plan
Prior to automating there should be a detailed description of the test including the exact steps to follow, data to be input, and all items to be verified by the test. The verification information should include both data validations and existence or state verifications of objects in the application.
2. Recording a session on your application
As you navigate through your application, Quick Test graphically displays each step you perform in the form of a collapsible icon-based test tree. A step is any user action that causes or makes a change in your site, such as clicking a link or image, or entering data in a form.
2. Enhancing your test
o Inserting checkpoints into your test lets you search for a specific value of a page, object or text string, which helps you identify whether or not your application is functioning correctly.
NOTE: Checkpoints can be added to a test as you record it or after the fact via the Active Screen. It is much easier and faster to add the checkpoints during the recording process.
o Broadening the scope of your test by replacing fixed values with parameters lets you check how your application performs the same operations with multiple sets of data.
o Adding logic and conditional statements to your test enables you to add sophisticated checks to your test.
3. Debugging your test
If changes were made to the script, you need to debug it to check that it operates smoothly and without interruption.
4. Running your test on a new version of your application
You run a test to check the behavior of your application. While running, QuickTest connects to your application and performs each step in your test.
5. Analyzing the test results
You examine the test results to pinpoint defects in your application.
6. Reporting defects
As you encounter failures in the application when analyzing test results, you will create defect reports in Defect Reporting Tool.
Q. Have you ever written a compiled module? If yes tell me about some of the functions that you wrote.A. I Used the functions for Capturing the dynamic data during runtime. Function used for Capturing Desktop, browser and pages.
Q. What projects have you used WinRunner on? Tell me about some of the challenges that arose and how you handled them.A. pbs :WR fails to identify the object in gui. If there is a non std window obk wr cannot recognize it ,we use GUI SPY for that to handle such situation.
Q. Can you do more than just capture and playback? A. I have done Dynamically capturing the objects during runtime in which no recording, no playback and no use of repository is done AT ALL.
-It was done by the windows scripting using the DOM (Document Object Model) of the windows.
Q. How long have you used the product? How long have you used the product?A. Yes, there’s an in-built functionality called “Step Generator” in Insert->Step->Step Generator -F7, which will generate the scripts as u enter the appropriate steps.
Q. What is the difference between check point and output value. A. An outPut value is a value captured during the test run and entered in the run-time but to a specified location.
EX:-Location in Data Table[Global sheet / local sheet]
Q. Discuss QTP Environment.A. Quick Test Pro environment using the graphical interface and Active Screen technologies – A testing process for creating test scripts, relating manual test requirements to automated verification features – Data driving to use several sets of data using one test script.
Q. Explain the concept of how QTP identifies object.A. During recording qtp looks at the object and stores it as test object. For each test object QT learns a set of default properties called mandatory properties, and look at the rest of the objects to check whether this properties are enough to uniquely identify the object. During test run, QT searches for the run time objects that matches with the test object it learned while recording.
Q. Differentiate the two Object Repository Types of QTP.A. Object repository is used to store all the objects in the application being tested.2 types of object repository per action and shared. In shared repository only one centralized repository for all the tests. Where as in per action. for each test a separate per action repository is created.
Q. What the differences are and best practical application of each.A. Per Action: For Each Action, one Object Repository is created.Shared : One Object Repository is used by entire application
Q. Explain what the difference between Shared Repository and Per Action RepositoryA. Shared Repository: Entire application uses one Object Repository, that similar to Global GUI Map file in Win RunnerPer Action: For each Action, one Object Repository is created, like GUI map file per test in Win Runner
Q. Explain in brief about the QTP Automation Object Model.A. Essentially all configuration and run functionality provided via the Quick Test interface is in some way represented in the Quick Test automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in Quick Test have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods. You can use the objects, methods, and properties exposed by the Quick Test automation object model, along with standard programming elements such as loops and conditional statements to design your program.
Q. How to handle dynamic objects in QTP?A. QTP has a unique feature called Smart Object Identification/recognition. QTP generally identifies an object by matching its test object and run time object properties. QTP may fail to recognize the dynamic objects whose properties change during run time. Hence it has an option of enabling Smart Identification, wherein it can identify the objects even if their properties changes during run time.Check this out-If Quick Test is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then Quick Test ignores the recorded description, and uses the Smart Identification mechanism to try to identify the object.While the Smart Identification mechanism is more complex, it is more flexible, and thus, if configured logically, a Smart Identification definition can probably help Quick Test identify an object, if it is present, even when the recorded description fails.
The Smart Identification mechanism uses two types of properties:Base filter properties—The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link’s tag was changed from to any other value, you could no longer call it the same object. Optional filter properties—Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable.
Q. What is a Run-Time Data Table? Where can I find and view this table?A. In QTP, there is data table used , which is used at runtime.-In QTP, select the option View->Data table.-This is basically an excel file, which is stored in the folder of the test created, its name is Default.xls by default.
Q. How does Parameterization and Data-Driving relate to each other in QTP?A. To datadrive we have to parameterize. i.e. we have to make the constant value as parameter, so that in each iteration(cycle) it takes a value that is supplied in run-time data table. Through parameterization only we can drive a transaction (action) with different sets of data. You know running the script with the same set of data several times is not suggestible, & it’s also of no use.
Q. What is the difference between Call to Action and Copy Action?A. Call to Action: The changes made in Call to Action , will be reflected in the original action( from where the script is called).But where as in Copy Action , the changes made in the script ,will not effect the original script(Action)
Q. Explain the concept of object repository & how QTP recognizes objects?A. Object Repository: displays a tree of all objects in the current component or in the current action or entire test (depending on the object repository mode you selected).We can view or modify the test object description of any test object in the repository or to add new objects to the repository.Quick test learns the default property values and determines in which test object class it fits. If it is not enough it adds assistive properties, one by one to the description until it has compiled the unique description. If no assistive properties are available, then it adds a special Ordinal identifier such as objects location on the page or in the source code.
Q. What are the properties you would use for identifying a browser & page when using descriptive programming ?A. “name” would be another property apart from “title” that we can use. ORWe can also use the property “micClass”.ex: Browser(“micClass:=browser”).page(“micClass:=page”)….
Q. What are the different scripting languages you could use when working with QTP ?A. Visual Basic (VB),XML, JavaScript, Java, HTML
Q. Few basic questions on commonly used Excel VBA functions.A. common functions are:Coloring the cellAuto fit cellsetting navigation from link in one cell to othersaving
Q. Explain the keyword createobject with an example.A. Creates and returns a reference to an Automation objectsyntax: Create Object (server name. Type name [, location])Argumentsservername:Required. The name of the application providing the object.typename : Required. The type or class of the object to create.location : Optional. The name of the network server where the object is to be created.
Q. How to handle the exceptions using recovery secnario manager in Qtp?A. You can instruct QTP to recover unexpected events or errors that occured in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps1. Triggered Events2. Recovery steps3. Post Recovery Test-Run
Q. what is the use of Text output value in Qtp?A. Output values enable to view the values that the application talkes during run time.When paramaterised, the values change for each iteration.Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.
Q. How to use the Object spy in QTP 8.0 version?A. There are two ways to Spy the objects in QTP1) Thru file toolbar—In the File ToolBar click on the last toolbar button (an icon showing a person with hat).2) Tru Object repository Dialog—In Objectrepository dialog click on the button”object spy…”In the Object spy Dialog click on the button showing hand symbol.the pointer now changes in to a hand symbol and we have to point out the object to spy the state of the objectif at all the object is not visible..or window is minimised then Hold the Ctrl button and activate the required window to and release the Ctrl button.
Q. What is the file extension of the code file & object repository file in QTP?A. File extension of– Per test object rep :- filename.mtr– Shared Oject rep :- filename.tsrCode file extension id script.mts
Q. Any limitation to XML Checkpoints?A. Mercury has determined that 1.4MB is the maximum size of a XML file that QTP 6.5 can handle
Q. How to make arguments optional in a function?A. this is not possible as default VBS doesn’t support this. Instead you can pass a blank scring and have a default value if arguments r not required.
Q. How to covert a String to an integer?A. CInt()—> a conversion function available.
Q. Inserting a Call to Action is not Importing all columns in Datatable of globalsheet. Why?A. Inserting a call to action will only Import the columns of the Action called
Q. What are the Features & Benefits of Quick Test Pro (QTP)..?A. 1. Key word driven testing 2. Suitable for both client server and web based application 3. Vb script as the scriot language 4. Better error handling mechanism 5. Excellent data driven testing features Server object error ‘ASP 0177 : 800401f3′Server.CreateObject Failed /qtp/qtpfaq25.asp, line 94 800401f3
Q. How to supress warnings from the “Test results page”?Ans : From the Test results Viewer “Tools > Filters > Warnings”…must be “Unchecked”.
Q. When we try to use test run option “Run from Step”, the browser is not launching automatically why?A. This is default behaviour.
Q. Does QTP is “Unicode” compatible?A. QTP 6.5 is not but QTP 8.0 is expected to be Unicode compatible by end of December 2004.
Q. How to “Turn Off” QTP results after running a Script?A. Goto “Tools > Options > Run Tab” and Deselect “View results when run session ends”. But this supresses only the result window, but a og will be created and can viewed manulaly which cannot be restricted from getting created.
Q. How to verify the Cursor focus of a certain field?A. Use “focus” property of “GetRoProperty” method”
Q. How to handle Run-time errors?A. (a) On Error Resume Next : causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement. This allows execution to continue despite a run-time error. You can then build the error-handling routine inline within the procedure.Using “Err” object msgbox “Error no: ” & ” ” & Err.Number & ” ” & Err.description & ” ” & Err.Source & Err.HelpContext
Q .How to change the run-time value of a property for an object?A. SetTOProperty changes the property values used to identify an object during the test run. Only properties that are included in the test object description can be set Q. How to retrieve the property of an object?A. using “GetRoProperty”.
Q. How to open any application during Scripting?A. SystemUtil , object used to open and close applications and processes during a run session.(a) A SystemUtil.Run statement is automatically added to your test when you run an application from the Start menu or the Run dialog box while recording a testE.g : SystemUtil.Run “Notepad.exe”SystemUtil.CloseDescendentProcesses ( Closes all the processes opened by QTP )
Q. Types of properties that Quick Test learns while recording?A. (a) Mandatory (b) Assistive .In addition to recording the mandatory and assistive properties specified in the Object Identification dialog box, Quick Test can also record a backup ordinal identifier for each test object. The ordinal identifier assigns the object a numerical value that indicates its order relative to other objects with an otherwise identical description (objects that have the same values for all properties specified in the mandatory and assistive property lists). This ordered value enables Quick Test to create a unique description when the mandatory and assistive properties are not sufficient to do so.
Q. Checking Bitmaps:A. You can check an area of a Web page or application as a bitmap. While creating a test or component, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. Quick Test captures the specified object as a bitmap, and inserts a checkpoint in the test or component. You can also choose to save only the selected area of the object with your test or component in order to save disk space.When you run the test or component, Quick Test compares the object or selected area of the object currently displayed on the Web page or application with the bitmap stored when the test or component was recorded. If there are differences, Quick Test captures a bitmap of the actual object and displays it with the expected bitmap in the details portion of the Test Results window. By comparing the two bitmaps (expected and actual), you can identify the nature of the discrepancy. For more information on test results of a checkpoint, see Viewing Checkpoint Results.For example, suppose you have a Web site that can display a map of a city the user specifies. The map has control keys for zooming. You can record the new map that is displayed after one click on the control key that zooms in the map. Using the bitmap checkpoint, you can check that the map zooms in correctly.You can create bitmap checkpoints for all supported testing environments (as long as the appropriate add-ins are loaded).Note: The results of bitmap checkpoints may be affected by factors such as operating system, screen resolution, and color settings.
Q. Text/Text Area Checkpoint .A. In the Text/Text Area Checkpoint Properties dialog box, you can specify the text to be checked as well as which text is displayed before and after the checked text. These configuration options are particularly helpful when the text string you want to check appears several times or when it could change in a predictable way during run sessions. Note: In Windows-based environments, if there is more than one line of text selected, the Checkpoint Summary pane displays [complex value] instead of the selected text string. You can then click Configure to view and manipulate the actual selected text for the checkpoint. Quick Test automatically displays the Checked Text in red and the text before and after the Checked Text in blue. For text area checkpoints, only the text string captured from the defined area is displayed (Text Before and Text After are not displayed). To designate parts of the captured string as Checked Text and other parts as Text Before and Text After, click the Configure button. The Configure Text Selection dialog box opens Checking XML : XML (Extensible Markup Language) is a meta-markup language for text documents that is endorsed as a standard by the W3C. XML makes the complex data structures portable between different computer environments/operating systems and programming languages, facilitating the sharing of data. XML files contain text with simple tags that describe the data within an XML document. These tags describe the data content, but not the presentation of the data. Applications that display an XML document or file use either Cascading Style Sheets (CSS) or XSL Formatting Objects (XSL-FO) to present the data. You can verify the data content of XML files by inserting XML checkpoints. A few common uses of XML checkpoints are described below: An XML file can be a static data file that is accessed in order to retrieve commonly used data for which a quick response time is needed—for example, country names, zip codes, or area codes. Although this data can change over time, it is normally quite static. You can use an XML file checkpoint to validate that the data has not changed from one application release to another.An XML file can consist of elements with attributes and values (character data). There is a parent and child relationship between the elements, and elements can have attributes associated with them. If any part of this structure (including data) changes, your application’s ability to process the XML file may be affected. Using an XML checkpoint, you can check the content of an element to make sure that its tags, attributes, and values have not changed.XML files are often an intermediary that retrieves dynamically changing data from one system. The data is then accessed by another system using Document Type Definitions (DTD), enabling the accessing system to read and display the information in the file. You can use an XML checkpoint and parameterize the captured data values in order to check an XML document or file whose data changes in a predictable way.XML documents and files often need a well-defined structure in order to be portable across platforms and development systems. One way to accomplish this is by developing an XML schema, which describes the structure of the XML elements and data types. You can use schema validation to check that each item of content in an XML file adheres to the schema description of the element in which the content is to be placed.
Q. Object Repositories types, Which & when to use? Deciding Which Object Repository Mode to Choose To choose the default object repository mode and the appropriate object repository mode for each test, you need to understand the differences between the two modes. In general, the object repository per-action mode is easiest to use when you are creating simple record and run tests, especially under the following conditions: You have only one, or very few, tests that correspond to a given application, interface, or set of objects. You do not expect to frequently modify test object properties. You generally create single-action tests. Conversely, the shared object repository mode is generally the preferred mode when: You have several tests that test elements of the same application, interface, or set of objects. You expect the object properties in your application to change from time to time and/or you regularly need to update or modify test object properties. You often work with multi-action tests and regularly use the Insert Copy of Action and Insert Call to Action options.
Q. Can we Script any test case with out having Object repository? or Using Object Repository is a must?A. No. U can script with out Object repository by knowing the Window Handlers, spying and recognizing theobjects logical names and properties available.
Q. How to execute a WinRunner Script in QTP?A. a. TSLTest.RunTest TestPath, TestSet [, Parameters ] –> Used in QTP 6.0 used for backward compatibilityParameters : The test set within Quality Center, in which test runs are stored. Note that this argument is relevant only when working with a test in a Quality Center project. When the test is not saved in Quality Center, this parameter is ignored.e.g : TSLTest.RunTest “D:\test1″, “”b. TSLTest.RunTestEx TestPath, RunMinimized, CloseApp [, Parameters ]TSLTest.RunTestEx “C:\WinRunner\Tests\basic_flight”, TRUE, FALSE, “MyValue”CloseApp : Indicates whether to close the WinRunner application when the WinRunner test run ends.Parameters : Up to 15 WinRunner function argument
Q. 3 differences between QTP & Winrunner?A. (a) QTP is object bases Scripting ( VBS) where Winrunner is TSL (C based) Scripting. (b) QTP supports “.NET” application Automation not available in Winrunner (c) QTP has “Active Screen” support which captures the application, not available in WR. (d) QTP has “Data Table” to store script values , variables which WR does not have. (e) Using a “point and click” capability you can easily interface with objects, theirdefinitions and create checkpoints after having recorded a script – without havingto navigate back to that location in your application like you have to with WinRunner.This greatly speeds up script development.
Q.How to add a runtime parameter to a datasheet?A. DataTable.LocalSheetThe following example uses the LocalSheet property to return the local sheet of the run-time Data Table in order to add a parameter (column) to it.MyParam=DataTable.LocalSheet.AddParameter(“Time”, “5:45″)
Q.What scripting language is QTP of ?A. Vbs
Q. Analyzing the Checpoint results Standard Checpoint :By adding standard checkpoints to your tests or components, you can compare the expected values of object properties to the object’s current values during a run session. If the results do not match the checkpoint fails.
Q.Table and DB CheckpointsA. By adding table checkpoints to your tests or components, you can check that a specified value is displayed in a cell in a table on your application. By adding database checkpoints to your tests or components, you can check the contents of databases accessed by your application.The results displayed for table and database checkpoints are similar. When you run your test or component, QuickTest compares the expected results of the checkpoint to the actual results of the run session. If the results do not match, the checkpoint fails.You can check that a specified value is displayed in a cell in a table by adding a table checkpoint to your test or component. For ActiveX tables, you can also check the properties ofthe table object. To add a table checkpoint, you use the Checkpoint Properties dialog box.Table checkpoints are supported for Web and ActiveX applications, as well as for a variety of external add-in environments.You can use database checkpoints in your test or component to check databases accessed by yourWeb site or application and to detect defects. You define a query on your database, and then you create a database checkpoint that checks the results of the query.Database checkpoints are supported for all environments supported by QuickTest, by default, as well as for a variety of external add-in environments.There are two ways to define a database query:(a) Use Microsoft Query. You can install Microsoft Query from the custom installation of Microsoft Office.(b) Manually define an SQL statement.The Checkpoint timeout option is available only when creating a table checkpoint. It is not available when creating a database checkpoint Q. what do you call the window testdirector-testlab?A. “Execution Grid”. It is place from where we Run all Manual / Automated Scripts
Q. How do u do batch testing in WR & is it possible to do in QTP, if so explain?A. You can use Test Batch Runner to run several tests in succession. The results for each test are stored in their default location.Using Test Batch Runner, you can set up a list of tests and save the list as an .mtb file, so that you can easily run the same batch of tests again, at another time. You can also choose to include or exclude a test in your batch list from running during a batch run.
Q. How to Import data from a “.xls” file to Data table during Runtime.A. Datatable.Import “…XLS file name…”DataTable.ImportSheet(FileName, SheetSource, SheetDest)DataTable.ImportSheet “C:\name.xls” ,1 ,”name”
Q.How to export data present in Datatable to an “.xls” file?A. DataTable.Export “….xls file name…”
Q. Syntax for how to call one script from another? and Syntax to call one “Action” in another? A. RunAction ActionName, [IterationMode , IterationRange , Parameters] Here the actions becomes reusable on making this call to any Action. IterationRange String Not always required. Indicates the rows for which action iterations will be performed. Valid only when the IterationMode is rngIterations. Enter the row range (i.e. “1-7″), or enter rngAll to run iterations on all rows. If the action called by the RunAction statement includes an ExitAction statement, the RunAction statement can return the value of the ExitAction’s RetVal argument.
Q. What is the Diff between Image check-point and Bit map Check point?A. Image checkpoints enable you to check the properties of a Web image.You can check an area of a Web page or application as a bitmap. Whilecreating a test or component, you specify the area you want to check byselecting an object. You can check an entire object or any area within anobject. QuickTest captures the specified object as a bitmap, and inserts acheckpoint in the test or component. You can also choose to save only theselected area of the object with your test or component in order to save disk SpaceFor example, suppose you have a Web site that can display a map of a citythe user specifies. The map has control keys for zooming. You can record thenew map that is displayed after one click on the control key that zooms inthe map. Using the bitmap checkpoint, you can check that the map zoomsin correctly.You can create bitmap checkpoints for all supported testing environments(as long as the appropriate add-ins are loaded).Note: The results of bitmap checkpoints may be affected by factors such asoperating system, screen resolution, and color settings.
Q. How many ways we can parameterize data in QTP ?A. There are four types of parameters:Test, action or component parameters enable you to use values passedfrom your test or component, or values from other actions in your test. Data Table parameters enable you to create a data-driven test (or action)that runs several times using the data you supply. In each repetition, oriteration, QuickTest uses a different value from the Data Table. Environment variable parameters enable you to use variable values fromother sources during the run session. These may be values you supply, orvalues that QuickTest generates for you based on conditions and optionsyou choose. Random number parameters enable you to insert random numbers asvalues in your test or component. For example, to check how yourapplication handles small and large ticket orders, you can have QuickTestgenerate a random number and insert it in a number of tickets edit field.
Q. How do u do batch testing in WR & is it possible to do in QTP, if so explain?A. Batch Testing in WR is nothing but running the whole test set by selecting “Run Testset” from the “Execution Grid”. The same is possible with QTP also. If our test cases are automated then by selecting “Run Testset” all the test scripts can be executed. In this process the Scripts get executed one by one by keeping all the remaining scripts in “Waiting” mode.
Q. If I give some thousand tests to execute in 2 days what do u do?A. Adhoc testing is done. It Covers the least basic functionalities to verify that the system is working fine. Q.what does it mean when a check point is in red color? what do u do?A. A red color indicates failure. Here we analyze the the cause for failure whether it is a Script Issue or Envronment Issue or a Application issue. Q. If an application name is changes frequently i.e while recording it has name “Window1” and then while running its “Windows2” in this case how does QTP handles? A. QTP handles those situations using “Regular Expressions”. Q. What is Parameterizing Tests? A. When you test your application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data.
Q. What is test object model in QTP ? A) The test object model is a large set of object types or classes that QuickTest
uses to represent the objects in your application. Each test object class has a
list of properties that can uniquely identify objects of that class and a set of
relevant methods that QuickTest can record for it.
A test object is an object that QuickTest creates in the test or component to
represent the actual object in your application. QuickTest stores information
about the object that will help it identify and check the object during the
run session.
A run-time object is the actual object in your Web site or application on
which methods are performed during the run session.
When you perform an operation on your application while recording,
QuickTest:
➤ identifies the QuickTest test object class that represents the object on which
you performed the operation and creates the appropriate test object
➤ reads the current value of the object’s properties in your application and
stores the list of properties and values with the test object
➤ chooses a unique name for the object, generally using the value of one of its
prominent properties
➤ records the operation that you performed on the object using the
appropriate QuickTest test object method
For example, suppose you click on a Find button with the following HTML
source code:
<INPUT TYPE=”submit” NAME=”Find” VALUE=”Find”>
QuickTest identifies the object that you clicked as a WebButton test object.
It creates a WebButton object with the name Find, and records the following
properties and values for the Find WebButton:
It also records that you performed a Click method on the WebButton.
QuickTest displays your step in the Keyword View like this:
QuickTest displays your step in the Expert View like this:
Browser(“Mercury Interactive”).Page(“Mercury Interactive”).WebButton(“Find”).Click
Q. What is Object Spy in QTP?A. Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object’s hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box.
Q. Supported Check-Points in QTP?
Q. IF we use batch testing. the result shown for last action only. in that how can i get result for every action.A. u can click on the icon in the tree view to view the result of every action
Q. How the exception handling can be done using QTPA. It can be done Using the Recovery Scenario Manager which provides a wizard that gudies you through the process of defining a recovery scenario. FYI.. The wizard could be accessed in QTP> Tools-> Recovery Scenario Manager …….
Q. How many types of Actions are there in QTP?A. There are three kinds of actions:non-reusable action—an action that can be called only in the test with which it is stored, and can be called only once.reusable action—an action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests.external action—a reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action.
Q. I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run command as well How do I do this?A. U can still make the notepad open without using the record or System utility script, just by mentioning the path of the notepad “( i.e., where the notepad.exe is stored in the system) in the “Windows Applications Tab” of the “Record and Run Settings window.
Q. How do you plan test automation? 1. Prepare the automation Test plan 2. Identify the scenario 3. Record the scenario 4. Enhance the scripts by inserting check points and Conditional Loops 5. Incorporated Error Handler 6. Debug the script 7. Fix the issue 8. Rerun the script and report the result.
Q. Explain about the Test Fusion Report of QTP ? A) Once a tester has run a test, a Test Fusion report displays all aspects of the test run: a high-level results overview, an expandable Tree View of the test specifying exactly where application failures occurred, the test data used, application screen shots for every step that highlight any discrepancies, and detailed explanations of each checkpoint pass and failure. By combining Test Fusion reports with Quick Test Professional, you can share reports across an entire QA and development team.
Q. To which environments does QTP supports ? A) Quick Test Professional supports functional testing of all enterprise environments, including Windows, Web, ..NET, Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic, ActiveX, mainframe terminal emulators, and Web services.
Q.Explain the QTP Tool interface. A) It contains the following key elements: Title bar, displaying the name of the currently open test Menu bar, displaying menus of Quick Test commands File toolbar, containing buttons to assist you in managing tests Test toolbar, containing buttons used while creating and maintaining tests
Debug toolbar, containing buttons used while debugging tests. Note: The Debug toolbar is not displayed when you open Quick Test for the first time. You can display the Debug toolbar by choosing View > Toolbars > Debug. Note that this tutorial does not describe how to debug a test. For additional information, refer to the Quick Test Professional User’s Guide. Action toolbar, containing buttons and a list of actions, enabling you to view the details of an individual action or the entire test flow.Note: The Action toolbar is not displayed when you open Quick Test for the first time. You can display the Action toolbar by choosing View > Toolbars > Action. If you insert a reusable or external action in a test, the Action toolbar is displayed automatically. For additional information, refer to the Quick Test Professional User’s Guide.
Test pane, containing two tabs to view your test-the Tree View and the Expert View Test Details pane, containing the Active Screen Data Table, containing two tabs, Global and Action, to assist you in parameterizing your test Debug Viewer pane, containing three tabs to assist you in debugging your test-Watch Expressions, Variables, and Command. (The Debug Viewer pane can be opened only when a test run pauses at a breakpoint.) Status bar, displaying the status of the test
Q. How to configure which add-ins will be loaded when working with Quality Center?A. Note: From QTP 6.5 version the test is opened with the correct add-ins, the settings below can be used with older versions.When Quality Center launches Quick Test Professional to run tests, then by default QTP is loaded with all add-ins which are installed on the machine. If you want QTP to be loaded with the last add-ins configuration which was opened on this specific machine you should change the following value in the registry of the machine which QTP is running on:[HKEY_CURRENT_USER\Software\Mercury Interactive\Quick Test Professional\MicTest\AddIn Manager]“SilentModeWithPredefinedAddIns”=dword:0000001
Q. How to open Quality Center connection dialog faster? A. You can launch the Quality Center connection dialog by double clicking on the right pane of the status bar of either QuickTest or the Report. Q. How do I use QuickTest together with Quality Center? A. Quality Center is a powerful test management tool that enables you to manage and control all phases of software testing. It provides a comprehensive view of the testing process so you can make strategic decisions about the human and material resources needed to test an application and repair defects.Quality Center and QuickTest work together to integrate all aspects of the testing process. In QuickTest, you can create tests and save them in your Quality Center project database. After a test has been run, the results are viewed and analyzed in Quality Center.For more information on using Quick Test and Quality Center together, please refer to the Quick Test User’s Guide.
Q. How Does Run time data (Parameterization) is handled in QTP? A. You can then enter test data into the Data Table, an integrated spreadsheet with the full functionality of Excel, to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files.
Q. What is keyword view and Expert view in QTP? A. Quick Test’s Keyword Driven approach, test automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View.
Advanced testers can view and edit their tests in the Expert View, which reveals the underlying industry-standard VBScript that Quick Test Professional automatically generates. Any changes made in the Expert View are automatically synchronized with the Keyword View.
Q. How to access the HTML tags directly? A. QuickTest provides direct access to the browser’s Document Object Model (DOM) through which you may access the HTML tags directly. Access to the DOM is done using the .Object notation. You can find more information about the DOM on the Microsoft Web Workshop web site.The test below demonstrates how to iterate over all the tags in the page. The test then outputs the inner-text of the tags (the text contained between the tags) to the report using the Reporter object.‘ We need the on error because not all the elements have inner-text
On Error Resume Next
Set Doc = Browser(“CNN Interactive”).Page(“CNN Interactive”).Object
‘ Loop through all the objects in the page
For Each Element In Doc.all
TagName = Element.TagName ‘ Get the tag name
InnerText = Element.innerText ‘ Get the inner text ‘ Write the information to the report
Reporter.ReportEvent 0, TagName, InnerText
Next
Q. Where can I find a web page’s cookie? A. The cookie used by the browser may by accessed through the browser’s Document Object Model (DOM). The following example returns the cookie collection from the browser. You can find more information about the DOM on the Microsoft Web Workshop web site.Browser(“Flight reservations”).Page(“Flight reservations”).Object.Cookie
Q. How to change the template test which is used by Quality Center to create new tests? A. When creating a new test from Quality Center, the test is based on a template test which is located under “bin/TD2000″ directory under the “Test Director Plugins” installation.You can replace this test to contain the test template that you wish to be used.Note that if you change the test to use a Quick Test Professional 6.0 (or later) template test then this test can not be opened in Astra LoadTest 5.x
Q. How to change the manual template test which is used by Quality Center when converting manual tests to Quick Test test? A. When you have a manual test defined in Quality Center and you want to create from it an automatic test, you can control the way this automatic test will be created.You can edit the ManualTemplate.txt file located under “bin/TD2000″ directory under “Test Director Plugins” installation to contain the steps which you want to be generated in the QTP test for each manual step.
Q. How to close Quick Test after <n> runs when running from Quality Center? A. When running multiple Quick Test Professional tests from Quality Center you can specify that you want to close QTP after specific amount of tests which are executed.To do so, you should add to the end of the mic.ini file (located under the bin directory of QTP installation) the following lines:[RemoteAgent]CloseToolAfterRuns=<number>
Q. How to record on non standard menus? A. In QuickTest Professional 8.0 you can decide how do you want QuickTest to behave while recording on menus from the UI.
This option is available in the “Advanced Windows Application Options” dialog to be found under
Tools > Options > Windows Applications > Advanced.More information can be found in the QuickTest User’s Guide
Q. How to terminate an application that is not responding? A. You can terminated any standard application while running a script in QuickTest.
If you want to terminate the application, just set this line:SystemUtil.CloseProcessByName “app.exe”orSystemUtil.CloseProcessByWndTitle “Some Title”
Q. Where can I find information on the IE Document Object Model? A. You can find more information on the IE DOM in the following links:Document object: http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_document.aspOther HTML Objects: http://msdn.microsoft.com/workshop/author/dhtml/reference/objects.aspGeneral DHTML reference: http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.aspQ. How to configure Quick Test to record on Embedded HTML Controls? A. In order to be able to record context sensitive operations on Embedded HTML Controls (an application which contains an embedded IE HTML viewer), you will need to set the followingAdd to the ie_hook section in mic.ini (located under Quick Test bin directory) the following lines:[ie_hook]myapp.exe=yes (where myapp.exe is the executable name of the application you want to test)you should change the following setting in the registry:[HKEY_CURRENT_USER\Software\Mercury Interactive\Quick Test Professional\MicTest\Hooks\myapp.exe]“bbHook”=dword:00000001
“GetMessageHook”=dword:00000001
“WndProcHook”=dword:00000001
Q. How do I launch a new browser from a test? A: A new browser window (and any other application) can be launched from within a test by adding the following step to your test:SystemUtil.Run “iexplore.exe”, “http://www.mercuryinteractive.com“Q.How do I make the test prompt the user for input while it is running? A. The VBScript InputBox function allows you to display a dialog box that prompts the user for input and then continue running the test. You can use the value that was entered by the user later on in the test. See the VBScript reference manual for more information on the InputBox function.The following example shows the InputBox function used to prompt the user for the password.Browser(“Mercury Tours”).Page(“Mercury Tours”).WebEdit(“username”).Set “administrator”
Passwd = inputbox (“Enter password”, “User Input”)
Browser(“Mercury Tours”).Page(“Mercury Tours”).WebEdit(“password”).Set Passwd
Q. How to remove result files from old tests? You can use the Test Results Deletion Tool to view a list of all the test results in a specific location in your file system or in a Quality Center project. You can then delete any test results that you no longer require.The Test Results Deletion Tool enables you to sort the test results by name, date, size, and more, so that you can easily identify the results you want to delete.You can find this utility in the Start Menu > QuickTest Professional > Tools > Test Results Deletion Tool.
Q. How to change the logical name of a Test Object? A. When recording an object Quick Test Professional uses one of the object’s properties as the logical name for the object (the name displayed in the Expert View and in the Keyward View modes).You can change the property that is used to be a different one by specifying which property’s value you want to use as the logical name for the object.For example in order to use the alt property as the logical name of an image, run regedit.exe and set the following information:[HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\Test Objects\Image]
“tag query name”=”alt“
Q. Changing the Mic.ini file A. Some of QuickTest Professional information is stored in a text file which is called mic.ini. This file is located under the QuickTest bin directory.[SectionA]NameA=ValueA To enter the above change to the mic.ini file you should perform the following:1. Open the mic.ini file located under the QuickTest Professional bin directory using any standard text editor2. Search for section name (in this case ‘SectionA’). If it does not exists – add it to the end of the file3. If the line (beginning with the NameA text) exists in the section, then change the value to be ValueAIf the line does not exist add it to the end of this section (before the next Section begins)
Q. How to change the registry? A. Note: Errors in the correct editing of the registry may cause severe malfunction to the operating system.[HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTestProfessional \MicTest\KeyA]“ValueA”=dword:0000001“ValueB”=”StringValue”In order to enter the above change to the registry, you should do the following:1. Open regedit (type regedit in the Start>Run dialog)2. Navigate to the specified path (in this case navigate to HKEY_CURRENT_USER > Software >…>KeyA)3. If the path does not exists, right click on the right pane, choose Key and enter the missing key name4. If the value does not exists, right click on the right pane, choose DWORD value or String value and enter the missing variable nameRight click on the variable, choose Modify and change the value to the correct one.
Q. How to use Environment variable?A. Quick test supports using environment variables. Environment variables can be either system variables or user defined variables.You can define the user defined variables in an external file which will be read by Quick Test when it will be launched.See the Using Environment Variables section in the Quick Test Professional help.
Q.Does Quick Test have any debugging capabilities? In order to debug tests you must install the Microsoft Script Debugger. If you did not download and installed it while installing Quick Test, the debugger can be still downloaded from the Microsoft Script Technologies site. After downloading it, double-click on the self-extracting executable and follow the instructions on your screen.Once the Script Debugger is installed, an arrow points to the current step that is being executed in the Tree View and the Expert View. You can then use the debugger to view local action variables, use the command window, view the objects properties, and more.More information can be found in the Quick Test User’s Guide.
Q. What command-line arguments can I use when launching Quick Test? A. Please refer to the Quick Test Command Line utility for more information on how to run Quick Test using a command line.
Q.I have a Microsoft Access database that contains data I would like to use in my test. How do I do this? The powerful ‘Expert View’ allows you to access databases using ADO and ODBC. Below is a sample test that uses the information contained in the Authors table of a database to search for books written by the author. Dim MyDB
Dim MyEng
Set MyEng = CreateObject(“DAO.DBEngine.35″)
Dim Td
Dim rs ‘ Specify the database to use
Set MyDB = MyEng.OpenDatabase(“BIBLIO.MDB”)
‘ Read and use the name of the first 10 authors
Set Td = MyDB.TableDefs(“Authors”)
Set rs = Td.OpenRecordset
rs.MoveFirst
For i = 1 To 10
Browser(“Book Club”).Page(“Search Books”).WebEdit(“Author Name”).Set rs(“Author”)
Browser(“Book Club”).Page(“Search Books”).WebButton(“Search”).Click
Next
Q.How do I add a manual wait step to my test? A manual wait (think time) can be added to a Quick Test test using the following command:Call Wait(<time in seconds to wait>)Q. How the Smart identification mechanism works ?1. A. Quick Test “forgets” the recorded test object description and creates a new object candidate list containing the objects (within the object’s parent object) that match all of the properties defined in the base filter property list.2. From that list of objects, Quick Test filters out any object that does not match the first property listed in the Optional Filter Properties list. The remaining objects become the new object candidate list.3. Quick Test evaluates the new object candidate list:Ø If the new object candidate list still has more than one object, Quick Test uses the new (smaller) object candidate list to repeat step 2 for the next optional filter property in the list. Ø If the new object candidate list is empty, Quick Test ignores this optional filter property, returns to the previous object candidate list, and repeats step 2 for the next optional filter property in the list. Ø If the object candidate list contains exactly one object, then Quick Test concludes that it has identified the object and performs the statement containing the object. 4. Quick Test continues the process described in steps 2 and 3 until it either identifies one object, or runs out of optional filter properties to use. If, after completing the Smart Identification elimination process, Quick Test still cannot identify the object, then Quick Test uses the recorded description plus the ordinal identifier to identify the object.
Q. Can I change the Active Screen page which is shown on every new test?A. This page can be changed to be any valid HTML page. The page can be located either locally or on the network.For example, if you want your entire organization to view the same Active Screen page when they open QTP, you should open the NewTest.inf file located under the dat\snapshots directory of QTP and set the next line:FileName1=<any full path to an HTML file>FileName1=\\mercury\public\MainPage.htmlQ. How to create an action template? You can create a template action script that will be used on every new action that is created. You can use this, for example, to add a header comments to each action.To create the template action you should create a text file with the name ActionTemplate.mst and place it under QTP dat folder.
Q.How to pass parameters when calling actions? A. You can pass information between actions in several ways:1. Using the new Action Parameters feature in Quick Test 8.02. Putting the variable in the data table and then accessing this data table from the called action.Defining the variable as an environment variable that can be accessed from the entire test.
Q.How to configure the report to show only error (by default)? A.You can configure the report to show only error by default by adding the following section to the QTReport.ini file (located under QTP bin directory).[FilterDialog]ReportAppDefaultFilter=1 # for error onlyReportAppDefaultFilter=3 # shows all messages (default)
Q. What is the purpose of Objects spy?A. the Object Spy also enables you to view both the run-time object methods and the test object methods associated with an object and to view the syntax for a selected method.
Q. What is the return value of the ‘Quit’ Method? A. The Quit method can return an optional error code. If the Quit method is the final instruction in your script (and you have no need to return a non-zero value), you can leave it out, and your script will end normally.
Q. What is the purpose of loading QTP Add-Ins? A. Quick Test add-ins help you to create and run tests and components on applications in a variety of development environments. Once you load an add-in, you can record and run tests and components on applications in the corresponding development environment, similar to the way you do with any other application. Q. What is Smart Identification mechanism in QTP ? A. When Quick Test uses the recorded description to identify an object, it searches for an object that matches every one of the property values in the description. In most cases, this description is the simplest way to identify the object and unless the main properties of the object change, this method will work. If Quick Test is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then Quick Test ignores the recorded description, and uses the Smart Identification mechanism to try to identify the object.
Q. What are the properties used by the Smart Identification mechanism?A. The Smart Identification mechanism uses two types of properties: Base filter properties—The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link’s tag was changed from <A> to any other value, you could no longer call it the same object.Optional filter properties—Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable.
Q. Can we re-use the user defined Environment variables? A. Yes, You can export your user-defined environment variables to an external .XML file for use with other tests or components.
Q. What is Object model ? A. An object model is a structural representation of software objects (classes) that comprise the implementation of a system or application. An object model defines a set of classes and interfaces, together with their properties, methods and events, and their relationships.
Q. Can A user use object repository file for two different tests which Are running at the same time?? A. Yes you can execute two different scripts using same object repository at same time. But the second test when on opening will prompt you a message saying that the OR has been locked, but you can run in read only mode.
Q. How do you comment your script? A. By using single quote (‘) before starting of the line QTP does not support multiple line comments
Q. How do you handle pop-up exceptions? A. By using Recovery Scenario manager or by using IF Browser (“…”)……………).Exists Then<Statements to process>……….
Q.What are batch tests and how do you create and run batch tests?A. You can use Test Batch Runner to run several tests in succession. The results for each test are stored in their default location.Choose Programs > QuickTest Professional > Tools > Test Batch Runner from the Start menu. The Test Batch Runner dialog box opensUsing Test Batch Runner, you can set up a list of tests and save the list as an .mtb file, so that you can easily run the same batch of tests again, at another time. You can also choose to include or exclude a test in your batch list from running during a batch run.
Q.How do you store and view batch test results?A.When you are ready to run your test batch, click the Run button or choose Batch > Run. If QuickTest is not already open, it opens and the tests run sequence begins. Once the batch run is complete, you can view the results for each test in its default test results folder (<test folder>\res#\report).
Q.What are the virtual objects and how do you learn them? A. Your application may contain objects that behave like standard objects but are not recognized by QuickTest. You can define these objects as virtual objects and map them to standard classes, such as a button or a check box.
Q.How to record the function Key Strokes? A By using SendKeys method For Ex: Set WshShell = CreateObject (“WScript.Shell”) WshShell.SendKeys “{F1}”
Q.What are Environment variable? A. Environment Variables are two types 1. Built-in 2. User-defined Internal 3. User-defined external
- Built-in variables—- that enable you to use current information about the test and the QuickTest computer running your test. These can include the test name, the test path, the operating system type and version, and the local host name.
- User-defined internal—variables that you define within the test. They are saved with the test or component and accessible only within the test or component in which they were defined.
User-defined external—variables that you predefined in the active external environment variables file. These variables are read-only in this context.
Q.How do you write messages to the report? A. By using Report Event method we will write messages to the reports.
Q.What is a command to invoke application? A. By using SystemUtil.Run method or by using InvokeApplication statement
Q.What is the diff between SystemUtil.Run and Invoke ?A. you should use a SystemUtil.Run statement to run applications or to open filesin their default applications. InvokeApplication statement is used to open the executable files and which is supported primarily for backward compatibility.
Q.How can I improve the working speed of QuickTest ?A. You can improve the working speed of QuickTest by doing any of the following:· Do not load unnecessary add-ins in the Add-in Manager when QuickTest starts· Run your tests in “Fast mode.” From the Run tab in the Options dialog box, select the Fast Option· If you are not using the Active Screen while editing your test, hide the Active Screen while editing your test to improve editing response time.· Decide if and how much information you want to capture and save in the Active ScreenDecide when you want to capture and save images of the application for the test results.
Q.How do I maintain my test when my application changes?A. The way to maintain a test when your application changes depends on how much your application changes. This is one of the main reasons you should create a small group of tests rather than one large test for your entire application. When your application changes, you can rerecord part of a test. If the change is not significant, you can manually edit a test to update it.
Q. What was the new features available in QTP 8.2? A. * New Keyword View * Updated Keyword View steps * New comment field row * New Documentation Only view * Multiple application areas * New Local parameter type * New Function Definition Generator
Q.Can we merge two Object Repository files into one file ? 1. Yes, by using QTP Plus Install QTP Plus and go to Start > Quick Test Plus > Utilities > Repositories Merge utility
Q.What is the Extensions of Script, Repositories Files ? 1. Script —— .mts Action based Object Repositories —-.mtr Shared Object Repository ——-.tsr
Q.How do you automate the Quick Test settings ?A.Open Test > Settings and before setting up the settings click on “Generate Script” button and save that script and every time before opening the QTP execute the saved Script.
Q. Explain about Update Run in QTP ?A. Test > Update .When you update a test or component, Quick Test runs through the test or component to update the test object descriptions, the expected checkpoint values, and/or the Active Screen images and values. After you save the test or component, the updated data is used for subsequent runs.
Q: Several QTP scripts may be called in a BPT test. Each one may have different data in a data table. How can the BA in BPT override and control data tables ? A: The data table is not used when working in BPT. Providing data for these runs should be done only through Quality Center in an interface easily accessible by a BA. A business component is a mini QTP test which has its own data table. Business Process Testing does not have control of data tables used by business components. It controls what Business Components are, how input/output parameters can be passed among the Business Components, and the order of the components. Currently there is no way from QC side to control it
Q:Can users who prefer descriptive programming in QTP have the ability to SaveAs Descriptive? If this is chosen, the OR values could be saved in the script instead of the logical values. A: No, this functionality is not available. Q: Will QTP/BPT work with descriptive programming or only through the object repository? A:QTP/BPT will work also with descriptive programming, but if you want to utilize the Keyword View for objects (not only operations) you must use an Object Repository.
Q: Win Runner uses TSL which is a derivative of C. QuickTestPro is VBScript. How are you going to be able to port Win Runner scripts to QuickTestPro? A: Mercury’s approach has not been to port scripts, but rather has an integrated platform on which all tests types can work together. This is available today in Quality Center’s Test Lab. Business Process Testing will provide another avenue for our testing products to work together.While it is possible to port scripts, it is also possible and generally far easier to call your Win Runner script / function from Quick Test Professional and visa versa. This integration is available today in the Mercury Functional Testing product, which includes full QTP and WR licenses.
Q: Quick Test Professional with SAP. External Support with Quality Center. Worried about future support. A: SAP is one of our most strategic environments and we are committed to supporting it. Quick Test Professional SAP add-in 8.2 supports the latest SAP environments, including SAP GUI 6.40 and Enterprise Portal 6. It should be available early next year.If the question is referring to QTSAP integration with TD/QC. We will continue to support this integration with QC. Quick Test Professional with the SAP add-in will work with QC as it does for all add-insQ:Upgrade of Test Director from 7.x to 8.0; Discuss best approaches and complications and pitfalls and benefits from the upgrade also things to watch out for… A:We have a “Best Practices” document in the KB about upgrading to TD 8.0. CSO website – Download section or KB, you can search for “Best Practices”
Q: We are using Load runner 7.8 FP1.In that we have load distribution graph, response time Vs transactions per sec (rounded to nearest sec). We are running tests on j2ee application where expected response times are in milli seconds (ex 150 millisecond per method). Because rounding to sec we are seeing all transactions below 1 sec. Is it possible to change response time scale as we needed in to milli seconds? We would like to see response time distribution respective to transactions per sec for whole scenario. Which is going to show us if there any spikes in response times?A: Today, the Analysis UI reports in seconds, even though the raw data is available in milliseconds. We have taken both of these as enhancement requests for future releases.
Q:I am running an endurance test on the client using QTP. The test is set to run 500 times. Is there a way to set a counter on the number of times the script actually ran when it quits before the 500? A: DataTable.GetCurrentRow holds the current iteration. When QTP quits, it can write this value to the report.
You can use environment variables or a regular variable to keep track of the number of times to run the script. You can then write this value to the runtime data table. When the script quits, go to the runtime data table and look at the value. If the script is based on iterations, then you can use the built-in environment variable “ActionIteration” or “TestIteration” which will give you the current iterations for either the test or the specific action.
Q: What are the differences between QTP 8.0 and Quality Center 8.0 vs. QTP 8.2 and Quality Center 8.2? A: We have created a product alert that describes what’s new in Quality Center and QTP 8.2. You can find the alert on the CSO website. In addition, Mercury will host a customer webinar on December 13th on Quality Center 8.2. Please see the CSO website for registration. We will also make the recording of the webinar available on the CSO website for subsequent viewing.
Q: How are checkpoint baseline values and the purpose of the checkpoint communicated back to the BA in BPT ? A: The idea is to provide these as custom keywords. The QTP engineer should create “verification” keywords (functions) and the BA will use them in QA while defining the component steps. These functions can be defined either using the standard checkpoint mechanism QTP provides, or any other mechanism the QTP experts builds. A checkpoint contains a number of properties / values and we use these properties / values to do the comparison at runtime. We then write the status of the checkpoint back to the QTP Report. If the report is stored in QC then it’s written to QC; if the report is stored on the file system then it’s written to the file system.
Q:I am trying to run tests from command line using QTPlaunch.exe with close option after executing the test. In my driver script execution it will set results file folder and other settings. Once the test is scheduled at the end it will ask for save option, this causes manual interference to accept yes or no. We need to fix this in order to execute the test unattended fashion using QTP command line utilities. A: We suggest you try restoring the default settings at the end of the test run to alleviate the problem. Note that in general, we recommend that using the command line option for automation be dropped in favor of using the QTP Automation API. If these suggestions do not resolve your issues, please do not hesitate to contact CSO for further assistance.
Q: Is Mercury planning to improve its reporting capability in TD? A: We believe that a tremendous amount of valuable information is generated during the quality process, and the ability to make use of that information for better decision making and project management is one of the key differentiators of Test Director for Quality Center. To that end, we do plan to continue to improve the reporting capability of Test Director as part of Quality Center. With Quality Center 8.2, we have enhanced the Dashboard and updated the Advanced Reports add-in. In upcoming releases, we will continue to enhance the dashboard, standard reports, and advanced reports.
Q: We are trying to run TD 8 through Citrix. First, we get a user login error message when it first displays but we can move past that and login. Then all of the colors are off – not correct and the graphics are bad. What can we do? A: Citrix is not an officially supported environment at this time, although we are aware of many customers who are successfully using Test Director in a Citrix environment. It is possible that one of these customers can give you some insight into the issues you are experiencing and provide some suggestions. The best place to interact with other customers is through the forums on the CSO website. We are investigating the possibility of adding support for Citrix in the near future. Please check for news and alerts on the CSO website.
Q: What plans are there to improve WinRunner’s and LoadRunner’s “behavior” with Oracle Apps 11.5.9? Currently I cannot upgrade to WR 7.6 because the synchronization doesn’t work [with Oracle 11.5.9] and I already have 2 patches (one custom, and another on the way) to try to make LR 7.8 FP1 work with 11.5.9.A: WinRunner 7.6 indeed had some synchronization issues with WR 7.6 Oracle Add-In and Oracle Apps 11.5.9. These issues were resolved with WR76JP11 (Fixes synchronization mechanism and several other minor issues).
Q: When will we have an integrated process that automatically extracts requirements, writes and tests programs?A: This is indeed a grand, long-term vision. Mercury is committed to improving and automating the overall quality process. We are constantly looking at ways to integrate with other solutions, like our own IT Governance center, and to automate additional aspects of quality assurance. A great example is the auto-documentation feature of the new Business Process Testing (BPT) module within Quality Center. Auto-documentation combines the previously separate steps of documenting a test and actually executing the test, significantly reducing the overall effort.
Q:I have a user interface in the application which has windows with the same labels. So when I make a recovery scenario, how do I distinguish the one with the labels and the one without as I do not want the recovery scenarios to be called on the wrong one? A: When defining the identification criteria in the pop-up trigger, you can also use the text within the window (or a substring from it) on top of the window title, as the differentiator between the windows.
Q: Can it be confirmed that Quality Center works with Microsoft SQL Server? A: Yes, Quality Center supports MS SQL server 2000 Enterprise edition.
Q: What is the best approach for migrating both test cases and defect entries from the home-grown application to Quality Center? A:We recommend you use the Word / Excel add-in and import the data into Quality Center.
Q: We’re using QTP v8.0 and capturing GUI with formatted numeric fields such as currency, etc. with commas and decimal. QTP does not capture the input (so that I can parameterize this later), but captures the formatted field after entry. How do I make QTP capture my input instead of the formatted field? How do I validate this formatted field that it contains valid input? A:1. If your numeric fields are edit boxes and QTP record commands like WinEdit.Set “1,234.56″ Then just replace Set command with Type command like WinEdit.Type “1234.56″ 2. In order to check the numeric value of the formatted field use VBS functions to convert from strings to numbers. For example:text = WinEdit.GetROProperty(“text”) ‘ returns string “1,234.56″num = CDbl(text) ‘ returns number 1234.56num1 = CInt(text) ‘ returns integer number 1235 More information is needed about this issue. But it sounds like a Data Table formatting issue where the text is being captured in one format but it shows up in QTP’s data table in another format
Q: One of the biggest highlights of the conference has been the concept of employing the BTO strategy while utilizing outsourced resources. How is Quality Center going to handle application security since these different resources may not exist on a common intranet? A: Since Quality Center utilizes HTTP communication through port 80, it works for both intranet and the internet environments. You are correct that outsourcing adds new security requirements. In addition, Mercury offers Quality Center as a managed service, which has further security requirements. For Quality Center 8.2, we have added support for Secure LDAP. And we will continue to enhance the security capabilities of Quality Center in upcoming releases. We will implement our electronic signature solution for Quality Center, add a more flexible security group structure, and improve integrations with existing security and identity management infrastructure.
1 comment September 10, 2007