Saturday 6 October 2012

Testing FAQ's

What's Ad Hoc Testing ?

A testing where the tester tries to break the software by randomly trying functionality of software.

What's the Accessibility Testing ?

Testing that determines if software will be usable by people with disabilities.

What's the Alpha Testing ?

The Alpha Testing is conducted at the developer sites and in a controlled environment by the end user of the software

What's the Beta Testing ?

Testing the application after the installation at the client place.

What is Component Testing ?

Testing of individual software components (Unit Testing).

What's Compatibility Testing ?

In Compatibility testing we can test that software is compatible with other elements of system.

What is Concurrency Testing ?

Multi-user testing geared towards determining the effects of accessing the same application code, module or database records. Identifies and measures the level of locking, deadlocking and use of single-threaded code and locking semaphores.

What is Conformance Testing ?

The process of testing that an implementation conforms to the specification on which it is based. Usually applied to testing conformance to a formal standard.

What is Context Driven Testing ?

The context-driven school of software testing is flavor of Agile Testing that advocates continuous and creative evaluation of testing opportunities in light of the potential information revealed and the value of that information to the organization right now.

What is Data Driven Testing ?

Testing in which the action of a test case is parameterized by externally defined data values, maintained as a file or spreadsheet. A common technique in Automated Testing.

What is Conversion Testing ? 

Testing of programs or procedures used to convert data from existing systems for use in replacement systems.

What is Dependency Testing ?

Examines an application's requirements for pre-existing software, initial states and configuration in order to maintain proper functionality.

What is Depth Testing ?

A test that exercises a feature of a product in full detail.

What is Dynamic Testing ?

Testing software through executing it. See also Static Testing.

What is Endurance Testing ? 

Checks for memory leaks or other problems that may occur with prolonged execution.

What is End-to-End testing ?

Testing 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.

What is Exhaustive Testing ?

Testing which covers all combinations of input values and preconditions for an element of the software under test.

What is Gorilla Testing ?

Testing one particular module, functionality heavily.

What is Installation Testing ?

Confirms that the application under test recovers from expected or unexpected events without loss of data or functionality. Events can include shortage of disk space, unexpected loss of communication, or power out conditions.

What is Localization Testing ?


This term refers to making software specifically designed for a specific locality.

What is Loop Testing ?

A white box testing technique that exercises program loops.

What is Mutation Testing ?

Mutation testing is 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 computational resources

What is Monkey Testing ?

Testing a system or an Application on the fly, i.e just few tests here and there to ensure the system or an application does not crash out.

What is Positive Testing ?

Testing aimed at showing software works. Also known as "test to pass". See also Negative Testing.

What is Negative Testing ?

Testing aimed at showing software does not work. Also known as "test to fail". See also Positive Testing.

What is Path Testing ?

Testing in which all paths in the program source code are tested at least once.

What is Performance Testing ?

Testing conducted to evaluate the compliance of a system or component with specified performance requirements. Often this is performed using an automated test tool to simulate large number of users. Also know as "Load Testing".

What is Ramp Testing ?

Continuously raising an input signal until the system breaks down.

What is Recovery Testing ?

Confirms that the program recovers from expected or unexpected events without loss of data or functionality. Events can include shortage of disk space, unexpected loss of communication, or power out conditions.

What is the Re-testing testing ?

Retesting- Again testing the functionality of the application.

What is the Regression testing ?

Regression- Check that change in code have not effected the working functionality

What is Sanity Testing ?

Brief test of major functional elements of a piece of software to determine if its basically operational.

What is Scalability Testing ?

Performance testing focused on ensuring the application under test gracefully handles increases in work load.

What is Security Testing ?

Testing which confirms that the program can restrict access to authorized personnel and that the authorized personnel can access the functions available to their security level.

What is Stress Testing ?

Stress testing is a form of testing that is used to determine the stability of a given system or entity. It involves testing beyond normal operational capacity, often to a breaking point, in order to observe the results.

What is Smoke Testing ?

A quick-and-dirty test that the major functions of a piece of software work. Originated in the hardware testing practice of turning on a new piece of hardware for the first time and considering it a success if it does not catch on fire.

What is Soak Testing ?

Running a system at high load for a prolonged period of time. For example, running several times more transactions in an entire day (or night) than would be expected in a busy day, to identify and performance problems that appear after a large number of transactions have been executed.

What's the Usability testing ?

Usability testing is for user friendliness.

What's the User acceptance testing ?

User acceptance testing is determining if software is satisfactory to an end-user or customer.

What's the Volume Testing ?

We can perform the Volume testing, where the system is subjected to large volume of data.


1 : With thorough testing it is possible to remove all defects from a program prior to delivery to the customer.


a. True
b. False

ANSWER : b

2 : Which of the following are characteristics of testable software ?

a. observability
b. simplicity
c. stability
d. all of the above

ANSWER : d

3 : The testing technique that requires devising test cases to demonstrate that each program function is operational is called

a. black-box testing
b. glass-box testing
c. grey-box testing
d. white-box testing

ANSWER : a 


4 : The testing technique that requires devising test cases to exercise the internal logic of a software module is called

a. behavioral testing
b. black-box testing
c. grey-box testing
d. white-box testing

ANSWER : d


5 : What types of errors are missed by black-box testing and can be uncovered by white-box testing ?

a. behavioral errors
b. logic errors
c. performance errors
d. typographical errors
e. both b and d

ANSWER : e


6 : Program flow graphs are identical to program flowcharts.


a. True
b. False

ANSWER : b

7 : The cyclomatic complexity metric provides the designer with information regarding the number of

a. cycles in the program
b. errors in the program
c. independent logic paths in the program
d. statements in the program

ANSWER : c

8 : The cyclomatic complexity of a program can be computed directly from a PDL representation of an algorithm without drawing a program flow graph.

a. True
b. False

ANSWER : a

9 : Condition testing is a control structure testing technique where the criteria used to design test cases is that they

a. rely on basis path testing
b. exercise the logical conditions in a program module
c. select test paths based on the locations and uses of variables
d. focus on testing the validity of loop constructs

ANSWER : b

10 : Data flow testing is a control structure testing technique where the criteria used to design test cases is that they

a. rely on basis path testing
b. exercise the logical conditions in a program module
c. select test paths based on the locations and uses of variables
d. focus on testing the validity of loop constructs

ANSWER : c

11 : Loop testing is a control structure testing technique where the criteria used to design test cases is that they

a. rely basis path testing
b. exercise the logical conditions in a program module
c. select test paths based on the locations and uses of variables
d. focus on testing the validity of loop constructs

ANSWER : d

12 : Black-box testing attempts to find errors in which of the following categories

a. incorrect or missing functions
b. interface errors
c. performance errors
d. all of the above
e. none of the above

ANSWER : d 


13 : Graph-based testing methods can only be used for object-oriented systems

a. True
b. False

ANSWER : b

14 : Equivalence testing divides the input domain into classes of data from which test cases can be derived to reduce the total number of test cases that must be developed.

a. True
b. False

ANSWER : a

15 : Boundary value analysis can only be used to do white-box testing.


a. True
b. False

ANSWER : b 


16 : Comparison testing is typically done to test two competing products as part of customer market analysis prior to product release.


a. True
b. False

ANSWER : b

17 : Orthogonal array testing enables the test designer to maximize the coverage of the test cases devised for relatively small input domains.

a. True
b. False

ANSWER : a

18 : Test case design "in the small" for OO software is driven by the algorithmic detail of
the individual operations.


a. True
b. False

ANSWER : a

19 : Encapsulation of attributes and operations inside objects makes it easy to obtain object state information during testing.


a. True
b. False

ANSWER : b

20 : Use-cases can provide useful input into the design of black-box and state-based tests of OO software.


a. True
b. False

ANSWER : a

21 : Fault-based testing is best reserved for


a. conventional software testing
b. operations and classes that are critical or suspect
c. use-case validation
d. white-box testing of operator algorithms

ANSWER : b

22 : Testing OO class operations is made more difficult by

a. encapsulation
b. inheritance
c. polymorphism
d. both b and c

ANSWER : d

23 : Scenario-based testing

a. concentrates on actor and software interaction
b. misses errors in specifications
c. misses errors in subsystem interactions
d. both a and b

ANSWER : a

24 : Deep structure testing is not designed to

a. examine object behaviors
b. exercise communication mechanisms
c. exercise object dependencies
d. exercise structure observable by the user

ANSWER : d


25 : Random order tests are conducted to exercise different class instance life histories.

a. True
b. False

ANSWER : a 


26 : Which of these techniques is not useful for partition testing at the class level

a. attribute-based partitioning
b. category-based partitioning
c. equivalence class partitioning
d. state-based partitioning

ANSWER : c

27 : Multiple class testing is too complex to be tested using random test cases.

a. True
b. False

ANSWER : b

28 : Tests derived from behavioral class models should be based on the 

a. data flowdiagram
b. object-relation diagram
c. state diagram
d. use-case diagram

ANSWER : c

29 : Client/server architectures cannot be properly tested because network load is highly variable.


a. True
b. False

ANSWER : b


30 : Real-time applications add a new and potentially difficult element to the testing mix

a. performance
b. reliability
c. security
d. time

ANSWER : d



Full form of QTP ?


Quick Test Professional

What's the QTP ?

QTP is Mercury Interactive Functional Testing Tool.

Which scripting language used by QTP ? 

QTP uses VB scripting.

What's the basic concept of QTP ?

QTP is based on two concept-
* Recording
* Playback

How many types of recording facility are available in QTP ?

QTP provides three types of recording methods-
* Context Recording (Normal)
* Analog Recording
* Low Level Recording

How many types of Parameters are available in QTP ?

QTP provides three types of Parameter-
* Method Argument
* Data Driven
* Dynamic

What's the QTP testing process ?


QTP testing process consist of seven steps-
* Preparing to recoding
* Recording
* Enhancing your script
* Debugging
* Run
* Analyze
* Report Defects

What's the Active Screen ?


It provides the snapshots of your application as it appeared when you performed a certain steps during recording session.

What's the Test Pane ?

Test Pane contains Tree View and Expert View tabs.

What's Data Table ?

It assists to you about parameterizing the test.

What's the Test Tree ?

It provides graphical representation of your operations which you have performed with your application.

Which all environment QTP supports ?

ERP/ CRM
Java/ J2EE
VB, .NET
Multimedia, XML
Web Objects, ActiveX controls
SAP, Oracle, Siebel, PeopleSoft
Web Services, Terminal Emulator
IE, NN, AOL

How can you view the Test Tree ?

The Test Tree is displayed through Tree View tab.

What's the Expert View ?

Expert View display the Test Script.

Which keyword used for Nornam Recording ?


F3

Which keyword used for run the test script ?

F5

Which keyword used for stop the recording ?


F4

Which keyword used for Analog Recording ?

Ctrl+Shift+F4

Which keyword used for Low Level Recording ?

Ctrl+Shift+F3

Which keyword used for switch between Tree View and Expert View ?

Ctrl+Tab

What's the Transaction ?

You can measure how long it takes to run a section of your test by defining transactions.

Where you can view the results of the checkpoint ?

You can view the results of the checkpoints in the Test Result Window.

What's the Standard Checkpoint ?

Standard Checkpoints checks the property value of an object in your application or web page.

Which environment are supported by Standard Checkpoint ?

Standard Checkpoint are supported for all add-in environments.

What's the Image Checkpoint ?

Image Checkpoint check the value of an image in your application or web page.

Which environments are supported by Image Checkpoint ?

Image Checkpoint are supported only Web environment.

What's the Bitmap Checkpoint ?

Bitmap Checkpoint checks the bitmap images in your web page or application.

Which enviornment are supported by Bitmap Checkpoints ?

Bitmap checkpoints are supported all add-in environment.

What's the Table Checkpoints ? 


Table Checkpoint checks the information with in a table.

Which environments are supported by Table Checkpoint ?

Table Checkpoints are supported only ActiveX environment.

What's the Text Checkpoint ?

Text Checkpoint checks that a test string is displayed in the appropriate place in your application or on web page.

Which environment are supported by Test Checkpoint ?

Text Checkpoint are supported all add-in environments

Note:


* QTP records each steps you perform and generates a test tree and test script.

* QTP records in normal recording mode.

* If you are creating a test on web object, you can record your test on one browser and run it on another browser.

* Analog Recording and Low Level Recording require more disk sapce than normal recording mode.

Friday 5 October 2012

Run the QTP test & Save results In One Folder


Set qtpo=CreateObject("Quicktest.Application")
qtpo.launch
qtpo.visible=true
set qtpro=createobject("quicktest.runresultsoptions")
qtpro.resultslocation="C:\Documents and Settings\qa\Desktop\csr"
qtpo.open("C:\Documents and Settings\qa\Desktop\qtp")
qtpo.test.run qtpro,true
qtpo.quit

Selenium Questions

1. What is Selenium?
Selenium is a set of tools that supports rapid development of test automation scripts for web based applications. Selenium testing tools provides a rich set of testing functions specifically designed to fulfill needs of testing of a web based application.

2. What are the main components of Selenium testing tools?
Selenium IDE, Selenium RC and Selenium Grid

3. What is Selenium IDE?
Selenium IDE is for building Selenium test cases. It operates as a Mozilla Firefox add on and provides an easy to use interface for developing and running individual test cases or entire test suites. Selenium-IDE has a recording feature, which will keep account of user actions as they are performed and store them as a reusable script to play back.

4. What is the use of context menu in Selenium IDE?

It allows the user to pick from a list of assertions and verifications for the selected location.

5. Can tests recorded using Selenium IDE be run in other browsers?
Yes. Although Selenium IDE is a Firefox add on, however, tests created in it can also be run in other browsers by using Selenium RC (Selenium Remote Control) and specifying the name of the test suite in command line.

6. What are the advantage and features of Selenium IDE?
a. Intelligent field selection will use IDs, names, or XPath as needed
b. It is a record & playback tool and the script format can be written in various languages including C#, Java, PERL, Python, PHP, HTML
c. Auto complete for all common Selenium commands
d. Debug and set breakpoints
e. Option to automatically assert the title of every page
f. Support for Selenium user-extensions.js file

7. What are the disadvantage of Selenium IDE tool?
a. Selenium IDE tool can only be used in Mozilla Firefox browser.
b. It is not playing multiple windows when we record it.

8. What is Selenium RC (Remote Control)?
Selenium RC allows the test automation expert to use a programming language for maximum flexibility and extensibility in developing test logic. For example, if the application under test returns a result set and the automated test program needs to run tests on each element in the result set, the iteration / loop support of programming language’s can be used to iterate through the result set, calling Selenium commands to run tests on each item. Selenium RC provides an API and library for each of its supported languages. This ability to use Selenium RC with a high level programming language to develop test cases also allows the automated testing to be integrated with the project’s automated build environment.

9. What is Selenium Grid?
Selenium Grid in the selenium testing suit allows the Selenium RC solution to scale for test suites that must be run in multiple environments. Selenium Grid can be used to run multiple instances of Selenium RC on various operating system and browser configurations.

10. How Selenium Grid works?
Selenium Grid sent the tests to the hub. Then tests are redirected to an available Selenium RC, which launch the browser and run the test. Thus, it allows for running tests in parallel with the entire test suite.

11. What you say about the flexibility of Selenium test suite?

Selenium testing suite is highly flexible. There are multiple ways to add functionality to Selenium framework to customize test automation. As compared to other test automation tools, it is Selenium’s strongest characteristic. Selenium Remote Control support for multiple programming and scripting languages allows the test automation engineer to build any logic they need into their automated testing and to use a preferred programming or scripting language of one’s choice.

Also, the Selenium testing suite is an open source project where code can be modified and enhancements can be submitted for contribution.

12. What test can Selenium do?
Selenium is basically used for the functional testing of web based applications. It can be used for testing in the continuous integration environment. It is also useful for agile testing

13. What is the cost of Selenium test suite?
Selenium test suite a set of open source software tool, it is free of cost.

14. What browsers are supported by Selenium Remote Control?
The test automation expert can use Firefox, IE 7/8, Safari and Opera browsers to run tests in Selenium Remote Control.

15. What programming languages can you use in Selenium RC?

C#, Java, Perl, PHP, Python, Ruby

16. What are the advantages and disadvantages of using Selenium as testing tool?

Advantages: Free, Simple and powerful DOM (document object model) level testing, can be used for continuous integration; great fit with Agile projects.

Disadvantages: Tricky setup; dreary errors diagnosis; can not test client server applications.

17. What is difference between QTP and Selenium?
Only web applications can be testing using Selenium testing suite. However, QTP can be used for testing client server applications. Selenium supports following web browsers: Internet Explorer,

Firefox, Safari, Opera or Konqueror on Windows, Mac OS X and Linux. However, QTP is limited to Internet Explorer on Windows.

QTP uses scripting language implemented on top of VB Script. However, Selenium test suite has the flexibility to use many languages like Java, .Net, Perl, PHP, Python, and Ruby.

18. What is difference between Borland Silk test and Selenium?
Selenium is completely free test automation tool, while Silk Test is not. Only web applications can be testing using Selenium testing suite. However, Silk Test can be used for testing client server applications. Selenium supports following web browsers: Internet Explorer, Firefox, Safari, Opera or Konqueror on Windows, Mac OS X and Linux. However, Silk Test is limited to Internet Explorer and Firefox.

Silk Test uses 4Test scripting language. However, Selenium test suite has the flexibility to use many languages like Java, .Net, Perl, PHP, Python, and Ruby.

19. What is the difference between an assert and a verify with Selenium commands?
Effectively an “assert” will fail the test and abort the current test case, whereas a “verify” will fail the test and continue to run the test case.


20. If a Selenium function requires a script argument, what would that argument look like in general terms?
StoreEval(script, variable) and storeExpression(expression, variableName)

21. If a Selenium function requires a pattern argument, what five prefixes might that argument have?

glob, regexp, exact, regexpi

22. What is the regular expression sequence that loosely translates to "anything or nothing?"

(.* i.e., dot star) This two-character sequence can be translated as “0 or more occurrences of any character” or more simply, “anything or nothing.

23. What is the globbing sequence that loosely translates to "anything or nothing?

(*) which translates to “match anything,” i.e., nothing, a single character, or many characters.

24. What does a character class for all alphabetic characters and digits look like in regular expressions?

[0-9] matches any digit
[A-Za-z0-9] matches any alphanumeric character
[A-Za-z] matches any alphabet character


25. What does a character class for all alphabetic characters and digits look like in globbing?
[0-9] matches any digit
[a-zA-Z0-9] matches any alphanumeric character
[a-zA-Z] matches any alphabet character

26. What must one set within SIDE in order to run a test from the beginning to a certain point within the test?
Set Toggle BreakPoint.

27. What does a right-pointing green triangle at the beginning of a command in SIDE indicate?

Play Entire Test Suite

28. Which wildcards does SIDE support?

*, [ ]

29. What are the four types of regular expression quantifiers which we've studied?

Ans : * quantifier: 0 or more of the preceding character (or group)
+ quantifier: 1 or more of the preceding character (or group)
? quantifier: 0 or 1 of the preceding character (or group)
{1,5} quantifier: 1 through 5 of the preceding character (or group)

30. What regular expression special character(s) means "any character?"

(.*)

31. What distinguishes between an absolute and relative URL in SIDE?

Absolute URL: Its is base url and this represent domain address.
Relative URL: (Absolute URL + Page Path).
Open command uses Base URL (Absolute URL) to navigate web page.

32. How would one access a Selenium variable named "count" from within a JavaScript snippet?
${count}

33. What Selenese command can be used to display the value of a variable in the log file, which can be very valuable for debugging?
echo()

34. If one wanted to display the value of a variable named answer in the log file, what would the first argument to the previous command look like?
echo()

35. Which Selenium command(s) simulates selecting a link?

click, clickandWait, ClickAt, ClickAtandWait, DoubleClick, DoubleClickandWait, doubleClickAt, doubleClickAtandWait

36. Which two commands can be used to check that an alert with a particular message popped up?

The following commands are available within Selenium for processing Alerts:
• getAlert()
• assertAlert()
• assertAlertNotPresent()
• assertAlertPresent()
• storeAlert()
• storeAlertPresent()
• verifyAlert()
• verifyAlertNotPresent()
• verifyAlertPresent()
• waitForAlert()
• waitForAlertNotPresent()
• waitForAlertPresent()
The AlertPresent() and AlertNotPresent() functions check for the existence or not of an alert – regardless of it’s content. The Alert() functions allow the caller to specify a pattern which should be matched. The getAlert() method also exists in Selenium RC, and returns the text from the previous Alert displayed.

QTP questions

Full form of QTP ?
Quick Test Professional

What's the QTP ?
QTP is Mercury Interactive Functional Testing Tool.

Which scripting language used by QTP ?
QTP uses VB scripting.

What's the basic concept of QTP ?
QTP is based on two concept-
* Recording
* Playback

How many types of recording facility are available in QTP ?
QTP provides three types of recording methods-
* Context Recording (Normal)
* Analog Recording
* Low Level Recording

How many types of Parameters are available in QTP ?
QTP provides three types of Parameter-
* Method Argument
* Data Driven
* Dynamic

What's the QTP testing process ?
QTP testing process consist of seven steps-
* Preparing to recoding
* Recording
* Enhancing your script
* Debugging
* Run
* Analyze
* Report Defects

What's the Active Screen ?
It provides the snapshots of your application as it appeared when you performed a certain steps during recording session.

What's the Test Pane ?
Test Pane contains Tree View and Expert View tabs.

What's Data Table ?
It assists to you about parametrize the test.

What's the Test Tree ?
It provides graphical representation of your operations which you have performed with your application.

Which all environment QTP supports ?
ERP/ CRM
Java/ J2EE
VB, .NET
Multimedia, XML
Web Objects, ActiveX controls
SAP, Oracle, Siebel, PeopleSoft
Web Services, Terminal Emulator
IE, NN, AOL

How can you view the Test Tree ?
The Test Tree is displayed through Tree View tab.

What's the Expert View ?
Expert View display the Test Script.

Which keyword used for Nornam Recording ?
F3

Which keyword used for run the test script ?
F5

Which keyword used for stop the recording ?
F4

Which keyword used for Analog Recording ?
Ctrl+Shift+F4

Which keyword used for Low Level Recording ?
Ctrl+Shift+F3

Which keyword used for switch between Tree View and Expert View ?
Ctrl+Tab

What's the Transaction ?
You can measure how long it takes to run a section of your test by defining transactions.

Where you can view the results of the checkpoint ?
You can view the results of the checkpoints in the Test Result Window.

What's the Standard Checkpoint ?

Standard Checkpoints checks the property value of an object in your application or web page.

Which environment are supported by Standard Checkpoint ?

Standard Checkpoint are supported for all add-in environments.

What's the Image Checkpoint ?
Image Checkpoint check the value of an image in your application or web page.

Which environments are supported by Image Checkpoint ?

Image Checkpoint are supported only Web environment.

What's the Bitmap Checkpoint ?
Bitmap Checkpoint checks the bitmap images in your web page or application.

Which enviornment are supported by Bitmap Checkpoints ?

Bitmap checkpoints are supported all add-in environment.

What's the Table Checkpoints ?
Table Checkpoint checks the information with in a table.

Which environments are supported by Table Checkpoint ?
Table Checkpoints are supported only ActiveX environment.

What's the Text Checkpoint ?
Text Checkpoint checks that a test string is displayed in the appropriate place in your application or on web page.

Which environment are supported by Test Checkpoint ?
Text Checkpoint are supported all add-in environments