Monday, December 24, 2012

Bluetooth Interview questions and answers


Bluetooth Profiles:
https://www.bluetooth.org/Building/HowTechnologyWorks/ProfilesAndProtocols/Overview.htm

Why is Bluetooth called a cable replacement technology? - Bluetooth technology allows the creation of Personal Area Networks without cables or wires that are usual in home networks.

Give a generic description of Bluetooth? - Bluetooth is a low-cost, short-range (RF) links between mobile PCs, mobile phones and other portable devices. Bluetooth can transmit through solid, non-metal objects.

Why can Bluetooth equipment integrate easily in TCP/IP network? - Because Bluetooth uses wireless LAN standards IEEE for data transmission.

Is it possible to connect multiple Bluetooth hubs? - No, only one hub can be used at a time with a computer. USB or Serial devices can be added.

What is FCC and how does it relate to Bluetooth? - FCC is Federal Communication Commission, which issues licenses to the stations for specific frequencies. It also decides who is able to use which frequency for what purpose. Since Bluetooth is using unlicensed spectrum, FCC has no direct involvement with Bluetooth

Under what frequency range does Bluetooth work? - 2.45 GHz is the frequency range.

Do Bluetooth devices need line of sight to connect to one another? - No.

Which technology is used in Bluetooth for avoiding interference? - Frequency hopping is the technology used in Bluetooth.

Bluetooth signals do not interfere with our PCs or cordless phones or portables. Why? - Bluetooth uses low-power signals, it plays around in 2.45 GHz range, while most of consumer devices would be using 900 MHz.

What is Airport? - Airport is a wireless communications system, like Bluetooth. It is based on the IEEE 802.11 recommendation. It also uses 2.4 GHz frequency band, but its range is about 45 meters and it boasts a transmission speed of 11 Mbit/second. It is developed by Lucent Technologies.

What is Piconet? - A collection of devices connected through Bluetooth technology in an ad hoc fashion.

What are the three main types of connection used by Bluetooth? - Single slave, Master slave, Scatternet .

What is FEC in Bluetooth? - Forward Error Correction is a method by which Bluetooth increases its noise immunity. FEC is a method that enables a receiver to not only detect, but also correct errors in a transmission.

Which method is primarily used for Voice transfer? - Synchronous Connection Oriented (SCO) is a method primarily used for Voice transfer.

What is the frequency range used for Bluetooth in Europe and United States? - 2402 MHz to 2480 MHz are the frequency ranges used in USA and Europe.

List some Technology characteristic of Bluetooth? - Omni directional, Adaptive output power to minimize interference, Support Synchronous & asynchronous services, Fast Frequency Hopping to avoid interference, Short data packets to maximize capacity during interface.

Which company originally conceived and developed Bluetooth? - Ericsson.

How does Bluetooth use frequency hopping for security? - Bluetooth picks a random frequency out of 79 and then hops around the range about 1600 times per second.

What is a Bluetooth dongle? - A device that hangs outside of a computer, or phone to provide Bluetooth connection.

What are the other (competing or not) wireless technologies? - Wi-Fi, IrDa, EDGE, UWB (Ultra Wide Band)

Which Bluetooth version uses adaptive frequency hopping? Why? - In Version 1.2 Adaptive frequency hopping method is used, which improves resistance to radio interference, and provides higher transmission speed.

How many SCO links are there in a piconet? - In a piconet, there can be up to three SCO links of 64,000 bits per second each.

what is the total number of masters and slaves in a piconet? - 1 Master and 7 Slaves.

Which method is used for Data transfer? - Asynchronous Connectionless (ACL) is Data transfer method in Bluetooth

What is the frequency range used for Bluetooth in Japan? - 2472 to 2497 MHz is the frequency range used for Bluetooth in Japan.

What is the strength of the signal transmitted by powerful cell phones? - The powerful cell phones can transmit a signal of 3 watts.

Why is Bluetooth 2.0 better?
The main features of Bluetooth Core Specification Version 2.0 + EDR are:
• 3 times faster transmission speed (up to 10 times in certain cases)
• Lower power consumption through reduced duty cycle
• Simplification of multi-link scenarios due to more available bandwidth
• Backwards compatible to earlier versions
• Further improved BER (Bit Error Rate) performance

Name few applications of Bluetooth?

  1. Wireless control of and communication between a cell phone and a hands free headset or car kit. This is the most popular use.
  2. Wireless networking between PCs in a confined space and where little bandwidth is required.
  3. Wireless communications with PC input devices such as mouses and keyboards and output devices such as printers.
  4. Transfer of files between devices via OBEX.
  5. Transfer of contact details, calendar appointments, and reminders between devices via OBEX.
  6. Replacement of traditional wired serial communications in test equipment, GPS receivers and medical equipment.
  7. For remote controls where infrared was traditionally used.
  8. Sending small advertisements from Bluetooth enabled advertising hoardings to other, discoverable, Bluetooth devices.
  9. Wireless control of a games console, Nintendo’s Wii and Sony’s PlayStation 3 will both use Bluetooth technology for their wireless controllers.
  10. Sending commands and software to the upcoming LEGO Mindstorms NXT instead of infra red.

How many devices can communicate concurrently?
A Bluetooth device playing the role of the “master” can communicate with up to 7 devices playing the role of the “slave”. This network of “group of up to 8 devices” (1 master + 7 slaves) is called a piconet. A piconet is an ad-hoc computer network of devices using Bluetooth technology protocols to allow one master device to interconnect with up to seven active slave devices (because a three-bit MAC address is used). Up to 255 further slave devices can be inactive, or parked, which the master device can bring into active status at any time.

What is Pairing?
Pairs of devices may establish a trusted relationship by learning (by user input) a shared secret known as a “passkey”. A device that wants to communicate only with a trusted device can cryptographically authenticate the identity of the other device. Trusted devices may also encrypt the data that they exchange over the air so that no one can listen in. The encryption can however be turned off and passkeys are stored on the device’s file system and not the Bluetooth chip itself. Since the Bluetooth address is permanent a pairing will be preserved even if the Bluetooth name is changed. Pairs can be deleted at any time by either device. Devices will generally require pairing or will prompt the owner before it allows a remote device to use any or most of its services. Some devices such as Sony Ericsson phones will usually accept OBEX business cards and notes without any pairing or prompts. Certain printers and access points will allow any device to use its services by default much like unsecured Wi-Fi networks.

How secure a Bluetooth device is?
Bluetooth uses the SAFER+ algorithm for authentication and key generation. The E0 stream cipher is used for encrypting packets. This makes eavesdropping on Bluetooth-enabled devices more difficult.

What is Bluetooth SIG?
Bluetooth Special Interest Group (SIG)

Bluetooth wireless technology is revolutionizing personal connectivity by providing freedom from wired connections. It is a specification for a small-form factor, low-cost radio solution providing links between mobile computers, mobile phones, other portable handheld devices and automobiles, as well as connectivity to the Internet. The Bluetooth SIG, comprised of leaders in the telecommunications, computing, automotive and consumer electronics industries, is driving development of the technology and bringing it to market. The Bluetooth SIG includes Promoter member companies Agere, Ericsson, IBM, Intel, Microsoft, Motorola, Nokia and Toshiba, and thousands of Associate and Adopter member companies. The Bluetooth SIG, Inc. headquarters are located in Overland Park, Kansas, U.S.A.

What are the problems with older versions (1.0 and 1.0 B)?
Versions 1.0 and 1.0 B had numerous problems and the various manufacturers had great difficulties in making their products interoperable. 1.0 and 1.0B also had mandatory Bluetooth Hardware Device Address (BD_ADDR) transmission in the handshaking process, rendering anonymity impossible at a protocol level, which was a major setback for services planned to be used in Bluetooth environments, such as Consumerism.

What are Different Classes in Bluetooth?
Bluetooth is a radio standard and communications protocol primarily designed for low power consumption, with a short range (power class dependent: 1 meter, 10 meters, 100 meters) based around low-cost transceiver microchip in each device.

Bluetooth lets these devices communicate with each other when they are in range. The devices use a radio communications system, so they do not have to be in line of sight of each other, and can even be in other rooms, so long as the received power is high enough.

What are Bluetooth profiles?
A profile is a description of how to use a specification to implement a particular function. The International Standards Organization (ISO) first came up with the idea of profiles. In Bluetooth, there are several profiles available and they are arranged in a hierarchical fashion. For example, in order to use the headset profile, a device must also include the lower level profiles such as the serial port and general access profiles.

What are some of the uses of Bluetooth?
Depending on the Bluetooth profiles included on the device, Bluetooth technology has the capability to wirelessly synchronize and transfer data among devices. The Bluetooth audio capabilities can be used for headset and hands free applications. The exact functionality provided by a Bluetooth enabled device depends on the Bluetooth profiles included.

How does Bluetooth fit in with WiFi?
The 802.11b (WiFi) standard is commonly used for wireless networking. Bluetooth is not a competitor with 802.11b, but rather a complement to it. While 802.11b is generally a replacement for wired local area networking, Bluetooth is more commonly used as a replacement for cables between individual devices. Bluetooth is designed to link devices within a very short range (up to 33 feet ). Bluetooth is part of the 802.15 standard.

What is the history of Bluetooth?
Bluetooth was initiated by Ericsson, IBM, Intel, Nokia and Toshiba in early 1998. These companies later formed a special interest group known as the Bluetooth SIG. The Bluetooth 1.0 specifications were released on July 26, 1999, but the technology has only recently become inexpensive enough for widespread use.

What is it - a technology, a standard, an initiative, or a product?
Bluetooth wireless technology is a de facto standard, as well as a specification for small-form factor, low-cost, short range radio links between mobile PCs, mobile phones and other portable devices. The Bluetooth Special Interest Group is an industry group consisting of leaders in the telecommunications, computing, and networking industries that are driving development of the technology and bringing it to market

Is Bluetooth an IEEE standard, like IEEE 802.11 and Ethernet?
Being an IEEE standard will be a big plus to widespread adoption of Bluetooth, and IEEE 802.15 working group for personal area networks (PAN) announced that they will be adopting Bluetooth as the IEEE 802.15 standard.

What types of companies are likely to adopt or promote Bluetooth technology?
Companies likely to adopt this technology include, but are not limited to, software developers, network vendors, silicon vendors, peripheral and camera manufacturers, mobile PC and handheld device manufacturers, consumer electronics manufacturers and more.

What companies are involved in the Bluetooth initiative?
Global technology leaders Ericsson, Nokia, IBM, Intel and Toshiba founded the Bluetooth SIG in 1998. These companies are now supported by over 1,000 other organizations with a wide range of expertise, including Widcomm, Inc.

Are different brands of Bluetooth products compatible?
Yes. They have to. The Bluetooth Logo Certification Program requires Bluetooth products to interoperate with products manufactured by other vendors; those products that don’t interoperate will not be allowed to use the Bluetooth logo.

Is Bluetooth practical for use with mobile devices?
Yes. One concern for mobile computing users is power consumption. Bluetooth radios are very low power, drawing as little as 0.3mA in standby mode and 30mA during sustained data transmissions. Bluetooth radios alternate among power-saving modes in which device activity is lowered to maximize the mobile power supply.

What kind of encryption will be used for Bluetooth security?
The Bluetooth specification 1.0 describes the link encryption algorithm as a stream cipher using 4 LFSR (linear feedback shift registers). The sum of the width of the LFSRs is 128, and the spec says “the effective key length is selectable between 8 and 128 bits”. This arrangement allows Bluetooth to be used in countries with regulations limiting encryption strength, and “facilitate a future upgrade path for the security without the need for a costly redesign of the algorithms and encryption hardware” according to the Bluetooth specification. Key generation and authentication seems to be using the 8-round SAFER+ encryption algorithm. The information available suggests that Bluetooth security will be adequate for most purposes; but users with higher security requirements will need to employ stronger algorithms to ensure the security of their data.

What is the range of Bluetooth transmitter/receivers?
Bluetooth is designed for very low power use, and the transmission range will only be 10m, about 30ft. High-powered Bluetooth devices will enable ranges up to 100m (300ft). Considering the design philosophy behind Bluetooth, even the 10m range is adequate for the purposes Bluetooth is intended for. Later versions of the Bluetooth spec may allow longer ranges.

What is the data throughput speed of a Bluetooth connection?
Bluetooth transfers data at a rate of 721 Kbps, which is from three to eight times the average speed of parallel and serial ports, respectively. This bandwidth is capable of transmitting voice, data, video and still images

Will Bluetooth and Wireless LAN (WLAN) interfere with each other?
No, both Bluetooth and WLAN can co-exist. Since Bluetooth devices use Frequency Hopping and most WLANs use Direct Sequence Spreading techniques they each appear as background noise to the other and should not cause any perceivable performance issues.

Will other RF (Radio Frequency) devices interfere with Bluetooth Devices?
No. Bluetooth radios operate on the unlicensed 2.4 GHz (Industrial, Scientific and Medical) frequency band that is shared among other devices (microwave ovens, cordless phones, garage door openers, etc. ). Bluetooth radios switch frequencies at such a rapid pace (1,600 times per second) and the data packets are so small that interference from other RF sources is highly unlikely. Bluetooth is a robust communication system.

What is Frequency-Hopping Spread Spectrum (FHSS)?
Frequency-Hopping Spread-Spectrum (FHSS) is a spread spectrum modulation scheme that uses a narrowband carrier that changes frequency in a pattern known to both transmitter and receiver. Properly synchronized, they maintain a single logical channel. To an unintended receiver, FHSS appears as short-duration impulse noise. More simply, the data is broken down into packets and transmitted to the receiver of other devices over numerous “hop frequencies” (79 total) in a pseudo random pattern. Only transmitters and receivers that are synchronized on the same hop frequency pattern will have access to the transmitted data. The transmitter switches hop frequencies 1,600 times per second to assure a high degree of data security

How secure is a Bluetooth network?
Bluetooth is extremely secure in that it employs several layers of data encryption and user authentication measures. Bluetooth devices use a combination of the Personal Identification Number (PIN) and a Bluetooth address to identify other Bluetooth devices. Data encryption (i.e., 128-bit) can be used to further enhance the degree of Bluetooth security. The transmission scheme (FHSS) provides another level of security in itself. Instead of transmitting over one frequency within the 2.4 GHz band, Bluetooth radios use a fast frequency-hopping spread spectrum (FHSS) technique, allowing only synchronized receivers to access the transmitted data

What is the future direction of the Bluetooth standard?
At this time, we anticipate the Bluetooth SIG to evolve the Bluetooth technology to provide greater bandwidth and distances, thus increasing the potential platforms and applications used in the emerging personal area networking marketplace.

How is Bluetooth used?
Bluetooth can be used to wirelessly synchronize and transfer data among devices. Bluetooth can be thought of as a cable replacement technology. Typical uses include automatically synchronizing contact and calendar information among desktop, notebook and palmtop computers without connecting cables. Bluetooth can also be used to access a network or the Internet with a notebook computer by connecting wirelessly to a cellular phone.

Do you Know about OBEX Protocol?
IrOBEX (shortly OBEX) is a session protocol developed by the Infrared Data Association (IrDA) to exchange objects in a simple and spontaneous manner. OBEX, which provides the same basic functionality as HTTP but in a much lighter fashion, uses a client-server model and is independent of the transport mechanism and transport API, provided it realizes a reliable transport base. Along with the protocol itself, the “grammar” for OBEX conversations between devices, OBEX also provides a model for representing objects and operations. In addition, the OBEX protocol defines a folder-listing object, which is used to browse the contents of folders on remote device. In the first phase, RFCOMM is used as sole transport layer for OBEX.

What is Service Discovery Protocol?
Discovery services are crucial part of the Bluetooth framework. These services provide the basis for all the usage models. Using SDP, device information, services and the characteristics of the services can be queried and after that, a connection between two or more Bluetooth devices can be established. SDP is defined in the Service Discovery Protocol specification.

What is Link Manager Protocol?
The link manager protocol is responsible for link set-up between Bluetooth devices. This includes setting up of security functions like authentication and encryption by generating, exchanging and checking of link and encryption keys and the control and negotiation of baseband packet sizes. Furthermore it controls the power modes and duty cycles of the Bluetooth radio device, and the connection states of a Bluetooth unit in a piconet.

Is it possible to connect multiple Bluetooth hubs?
No, only one hub can be used at a time with a computer. USB or Serial devices can be added.

List some Technology characteristic of Bluetooth?
Omni directional,
Adaptive output power to minimize interference,
Support Synchronous & asynchronous services,
Fast Frequency Hopping to avoid interference,
Short data packets to maximize capacity during interface.

What is the total number of masters and slaves in a piconet?
1 Master and 7 Slaves.

Under what frequency range does Bluetooth work?
2.45 GHz is the frequency range.

What is the frequency range used for Bluetooth in Europe and United States?
2402 MHz to 2480 MHz are the frequency ranges used in USA and Europe

What is the frequency range used for Bluetooth in Japan?
2472 to 2497 MHz is the frequency range used for Bluetooth in Japan.

What is Piconet?
A collection of devices connected through Bluetooth technology in an ad hoc fashion.

What is a Bluetooth dongle?
A device that hangs outside of a computer, or phone to provide Bluetooth connection.

Why can Bluetooth equipment integrate easily in TCP/IP network?
Because Bluetooth uses wireless LAN standards IEEE for data transmission.

Which method is used for Data transfer?
Asynchronous Connectionless (ACL) is Data transfer method in Bluetooth

Give a generic description of Bluetooth?
Bluetooth is a low-cost, short-range (RF) links between mobile PCs, mobile phones and other portable devices. Bluetooth can transmit through solid, non-metal objects.

How does Bluetooth use frequency hopping for security?
Bluetooth picks a random frequency out of 79 and then hops around the range about 1600 times per second.

Why is Bluetooth called a cable replacement technology?
Bluetooth technology allows the creation of Personal Area Networks without cables or wires that are usual in home networks.

What is FCC and how does it relate to Bluetooth?
FCC is Federal Communication Commission, which issues licenses to the stations for specific frequencies. It also decides who is able to use which frequency for what purpose. Since Bluetooth is using unlicensed spectrum, FCC has no direct involvement with Bluetooth

What is FEC in Bluetooth?
Forward Error Correction is a method by which Bluetooth increases its noise immunity. FEC is a method that enables a receiver to not only detect, but also correct errors in a transmission.

What is Airport?
Airport is a wireless communications system, like Bluetooth. It is based on the IEEE 802.11 recommendation. It also uses 2.4 GHz frequency band, but its range is about 45 meters and it boasts a transmission speed of 11 Mbit/second. It is developed by Lucent Technologies.

Which technology is used in Bluetooth for avoiding interference?
Frequency hopping is the technology used in Bluetooth.

How many SCO links are there in a piconet?
In a piconet, there can be up to three SCO links of 64,000 bits per second each.

Which Bluetooth version uses adaptive frequency hopping? Why?
In Version 1.2 Adaptive frequency hopping method is used, which improves resistance to radio interference, and provides higher transmission speed.

Is it possible to connect multiple Bluetooth hubs?
No, only one hub can be used at a time with a computer. USB or Serial devices can be added.

List some Technology characteristic of Bluetooth?
Omni directional, Adaptive output power to minimize interference, Support Synchronous & asynchronous services, Fast Frequency Hopping to avoid interference, Short data packets to maximize capacity during interface.

Which method is primarily used for Voice transfer?
Synchronous Connection Oriented (SCO) is a method primarily used for Voice transfer.

What is the strength of the signal transmitted by powerful cell phones?
The powerful cell phones can transmit a signal of 3 watts.

What are the other (competing or not) wireless technologies?
Wi-Fi, IrDa, EDGE, UWB (Ultra Wide Band)

Thursday, December 20, 2012

Android Testing Questions

What is Android?
Android is a stack of software for mobile devices which includes an Operating System, middleware and some key applications. The application executes within its own process and its own instance of Dalvik Virtual Machine. Many Virtual Machines run efficiently by a DVM device. DVM executes Java languages byte code which later transforms into .dex format files.

What is the Android Architecture?
Android Architecture is made up of 4 key components:
- Linux Kernel
- Libraries
- Android Framework
- Android Applications

Explain the Boot sequence of Andriod?
Step 1: Power on and boot ROm code execution
Step 2: The Boot Loader Loading
Step 3: Starting of Linux Kernal
Step 4: The init Process
Step 5: Zygote and Dalvin
Step 6: The System Server initation

What is Bootchart and how to use?
Bootchart is a system designed to show a graphical display of the activity of a system during boot. The tool consists of a data collection tool and a graphic generator tool.
Overview of Steps to Use Bootchart
*install the bootchart tool on your host machine
*build 'init' with bootchart support
*install 'init' into your system image
*trigger bootchart functionality on system boot
*retrieve the collected data from the system
*generate the graphic from the data
*view the resulting graphic
*interpret the results

What are the features of Andriod?
1. Software Feature:
*Integrated Browser based on the open source Web Kit Engine
*SQlite for Relational data storage
*Media Support for Common Audio, Video  and still image format
*Dalvik Virtual Machine Optimized for mobile devices
2. Harware Features:
*Celluar networking : GSM, EDGE, 3G
*LAN : Bluetooth and Wifi
*Grafics Hardware and acceleration
*Camera , GPS and Compass
3.Security
*Andriod applications runs in a sandbox, an isolated area of the OS that does not have access to the rest of the sysems's resources,unless access permissions are granted by the user when the application is installed.

What are the core components under the Android application architecture?
There are 5 key components under the Android application architecture:
- services
- intent
- resource externalization
- notifications
- content providers


What is an Activity?
A single screen in an application, with supporting Java code.

What is an Intent?
A class (Intent) which describes what a caller desires to do. The caller will send this intent to Android’s intent resolver, which finds the most suitable activity for the intent. E.g. opening a PDF document is an intent, and the Adobe Reader apps will be the perfect activity for that intent (class).

What is the AndroidManifest.xml?
This file is essential in every application. It is declared in the root directory and contains information about the application that the Android system must know before the codes can be executed.

What is the APK format? ( Android Package file)
The APK file is compressed AndroidManifest.xml file with extension .apk. It also includes the application code (.dex files), resource files, and other files which are compressed into a single .apk file.


How to sync Kernel time and logcat time?
$adb shell  
$logcat -v time -f /dev/kmsg | cat /proc/kmsg > /data/klog_plog_log.txt
you can differentiate both the logs using time stamps in the platform logs. And then pull the file to your local drive using
adb pull /data/klog_plog_log.txt > sample.txt

How To Boot the Android mobile device into Recovery Mode?
Step 1. Turn your phone off.
Step 2. Hold down “Volume Up keys” +“Home” and press “Power” until the screen light ups.
Step 3. Press the three keys unlit green screen like below appears:

How to get kernel messages from Android? - BootLoader
http://bootloader.wikidot.com/linux:android:kmsg

Uses of android : -
  1. Android is useful because:
  2. It is simple and powerful SDK
  3. Licensing, Distribution or Development fee is not required
  4. Easy to Import third party Java library
  5. Supporting platforms are – Linux, Mac Os, Windows
Overview of the steps you must follow to set up the Android SDK:
  1. Prepare your development computer and ensure it meets the system requirements.
  2. Install the SDK starter package. (If you're on Windows, download the installer for help with the initial setup.) Download Link : http://developer.android.com/sdk/index.html
  3. Install the ADT Plugin for Eclipse (if you'll be developing in Eclipse).
  4. Add Android platforms and other packages to your SDK.
  5. Explore the contents of the Android SDK (optional). 
What are the advantages of Android?
The following are the advantages of Android:
  1. The customer will be benefited from wide range of mobile applications to choose, since the monopoly of wireless carriers like AT&T and Orange will be broken by Google Android.
  2. Features like weather details, live RSS feeds, opening screen, icon on the opening screen can be customized
  3. Innovative products like the location-aware services, location of a nearby convenience store etc., are some of the additive facilities in Android
How can I get logs from my Android device?
You can get platform logs with the following command:
adb logcat > platform.log &
And kernel logs with:
adb shell cat /proc/kmsg > kmsg.log &

Features of Android:
  1. Application framework enabling reuse and replacement of components
  2. Dalvik virtual machine optimized for mobile devices
  3. Integrated browser based on the open source WebKit engine
  4. Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)
  5. SQLite for structured data storage
  6. Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
  7. GSM Telephony (hardware dependent)
  8. Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
  9. Camera, GPS, compass, and accelerometer (hardware dependent)
  10. Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE.
What is ANR?
ANR = Application Not Responding
which means, in android it is a general rule of thumb, if an application doesn't respond with 5 seconds android takes control and shows the Application Not Responding dialog and gives control to the user to close the application.


What Is ADB??
ADB stands for Android Debug Bridge. It comes as a part of the standard Android SDK, which you can grab here. Basically, it provides a terminal-based interface for interacting with your phone’s file system. Since Android platform is based on Linux, command-line is the only way to obtain and manipulate root access often required to perform certain advanced operations on your device using root access.

While these things can be done directly on the device itself using some terminal emulator, it will be rather difficult to execute complex commands on such a small screen. ADB provides the bridge between your machine and your computer

For example,the following ADB commands:

adb push BurritoRoot2.bin /data/local/
adb shell chmod 777 /data/local/BurritoRoot2.bin
adb shell /data/local/BurritoRoot2.bin
adb root
adb shell id
adb remount
adb push su /system/xbin/su
adb shell chown 0.0 /system/xbin/su
adb shell chmod 06755 /system/xbin/su
adb remount
adb install Superuser.apk

Using ADB
One of the first things to remember is to put your device in USB debugging mode. This can be found by navigating to Menu>Settings>Applications>Development and checking the box for USB debugging. Without doing this, your PC won’t recognize your device.

The most important thing to know is simply how to get to your ADB folder via the command line. This is done with the cd (change directory) command. So if (on Windows) your SDK folder is called “android-SDK” and it’s in your root (c:) directory, you would type the following to get there:
cd c:/android-SDK
Then, to get into the ADB folder, you would add the following:
cd platform-tools
at that point, you should see a prompt that says:
C:\android-SDK\platform-tools>
At this point you can connect your device and test your ADB connection. After you’ve located and installed the drivers for your particular device, type the following:
adb devices
If everything is set up properly, you should see a list of devices attached. Your phone or tablet will have a number assigned to it, so don’t be surprised if it doesn’t say “Droid Razr” or “Galaxy Nexus.”







What is Dalvik virtual machine?
The name of Android’s virtual machine. The Dalvik VM is an interpreter-only virtual machine that executes files in the Dalvik Executable (.dex) format, a format that is optimized for efficient storage and memory-mappable execution.

The virtual machine is register-based, and it can run classes compiled by a Java language compiler that have been transformed into its native format using the included “dx” tool.

Android Testing:



Monday, December 17, 2012

Testing Fundamentals

What is a Test Plan?

A test plan can be defined as a document describing the scope, approach, resources, and schedule of intended testing activities. It identifies test items, the features to be tested, the testing tasks, who will do each task, and any risks requiring contingency planning.

In software testing, a test plan gives detailed testing information regarding an upcoming testing effort, including
  1. Scope of testing
  2. Schedule
  3. Test Deliverables
  4. Release Criteria
  5. Risks and Contingencies
It is also be described as a detail of how the testing will proceed, who will do the testing, what will be tested, in how much time the test will take place, and to what quality level the test will be performed.

What is Test cases??

A test case is a set of conditions or variables under which a tester will determine whether a system under test satisfies requirements or works correctly.
The process of developing test cases can also help find problems in the requirements or design of an application.
TEST CASE TEMPLATE
A test case can have the following elements. Note, however, that normally a test management tool is used by companies and the format is determined by the tool used.
Test Suite IDThe ID of the test suite to which this test case belongs.
Test Case IDThe ID of the test case.
Test Case SummaryThe summary / objective of the test case.
Related RequirementThe ID of the requirement this test case relates/traces to.
PrerequisitesAny prerequisites or preconditions that must be fulfilled prior to executing the test.
Test ProcedureStep-by-step procedure to execute the test.
Test DataThe test data, or links to the test data, that are to be used while conducting the test.
Expected ResultThe expected result of the test.
Actual ResultThe actual result of the test; to be filled after executing the test.
StatusPass or Fail. Other statuses can be ‘Not Executed’ if testing is not performed and ‘Blocked’ if testing is blocked.
RemarksAny comments on the test case or test execution.
Created ByThe name of the author of the test case.
Date of CreationThe date of creation of the test case.
Executed ByThe name of the person who executed the test.
Date of ExecutionThe date of execution of the test.
Test EnvironmentThe environment (Hardware/Software/Network) in which the test was executed.
WRITING GOOD TEST CASES
  • As far as possible, write test cases in such a way that you test only one thing at a time. Do not overlap or complicate test cases. Attempt to make your test cases ‘atomic’.
  • Ensure that all positive scenarios and negative scenarios are covered.
  • Language:
    • Write in simple and easy to understand language.
    • Use active voice: Do this, do that.
    • Use exact and consistent names (of forms, fields, etc).
  • Characteristics of a good test case:
    • Accurate: Exacts the purpose.
    • Economical: No unnecessary steps or words.
    • Traceable: Capable of being traced to requirements.
    • Repeatable: Can be used to perform the test over and over.
    • Reusable: Can be reused if necessary.
What is Regression Testing??
Regression testing is a type of software testing that intends to ensure that changes (enhancements or defect fixes) to the software have not adversely affected it.

ELABORATION
The likelihood of any code change impacting functionalities that are not directly associated with the code is always there and it is essential that regression testing is conducted to make sure that fixing one thing has not broken another thing.
During regression testing, new test cases are not created but previously created test cases are re-executed.

LEVELS APPLICABLE TO
Regression testing can be performed during any level of testing (Unit, Integration, System, or Acceptance) but it is mostly relevant during System Testing.

EXTENT
In an ideal case, a full regression test is desirable but oftentimes there are time/resource constraints. In such cases, it is essential to do an impact analysis of the changes to identify areas of the software that have the highest probability of being affected by the change and that have the highest impact to users in case of malfunction and focus testing around those areas.

Difference between "Retesting" and "Regression Testing"?

RETESTING : 
When a bug is found, it needs to be communicated and assigned to developers that can fix it. After the problem is resolved, fixes should be re-tested with the same test data. 

Additionally,determinations should be made regarding requirements, software, hardware, safety impact, etc. to make sure the application works as expected.

Regression Testing 
Testing the application once the bug is fixed with new test data to check the fixes didn't create other problems elsewhere.


What is Test Strategy??

A Test Strategy document is a high level document and normally developed by project manager. This document defines “Testing Approach” to achieve testing objectives. The Test Strategy is normally derived from the Business Requirement Specification document.

The Test Stategy document is a static document meaning that it is not updated too often. It sets the standards for testing processes and activities and other documents such as the Test Plan draws its contents from those standards set in the Test Strategy Document.

Some companies include the “Test Approach” or “Strategy” inside the Test Plan, which is fine and it is usually the case for small projects. However, for larger projects, there is one Test Strategy document and different number of Test Plans for each phase or level of testing.


What are Test Strategy, Test Approach and Test method ?

What Is a Test Strategy?

A test strategy is a planning document that provides the overall direction for the software testing needs of a project. Developing a test strategy is about setting direction and resolving high-level testing questions. The value of the test strategy isn’t in the wording, the writing, or the format of the strategy; the value is in planning an approach for testing.
Test strategies can range from informal to very formal. In its simplest form, the test strategy is exactly that—a strategy. It’s a roadmap for what testing will be done, and details the way in 
which the testing will be accomplished:
How? Answers to this question might identify the types of testing needed, such as manual or automated testing. 
Where? These answers detail the actual test environment, including specific server names, and may include a diagram of all the physical or logical components. 
Who? The test strategy must specify the testing resources and other resources needed to accomplish the testing. 
When? A good test strategy outlines the time of the first internal build for testing and likely includes a rough schedule for the remainder of the project. 
These high-level questions need answers early in a project. The test strategy also might address related testing topics such as purchasing test tools or the defect-reporting process.
Test Approach
The test approach describes the types of tests performed and the sequence of tests as executed in the test lab.
Test Types
The types of tests that were considered for testing the Small IT Solution include:

These tests are limited to specific configurations made within the solution.
Build Verification Tests
The following goals were adopted for build verification testing:
Clarity: The steps should clearly describe the options that must be selected to enable the service. 
Completeness: All configuration options required to configure the service are described. 
Presentation: The process for configuring the service is linearly presented and represents the process that must be followed when initially deploying the solution. 
Consistency: The configuration options presented in the solution should always use the tools that are best suited for configuring the service. Consistency for each service is summarized as follows:

Functional Tests
The following goals were adopted for functional testing:
· Completeness: The functional test cases ensure that the technical goals of the solution are achieved.
Management Tests
The following goals were adopted for security tests:
Technical Writing Tests
The goals of the technical writing tests are as follows:
Security Tests
The following goals were adopted for security tests:
• Principle of least privilege: The configuration recommendations should follow the principle of assigning least privilege. 
• Availability: Verify that configuration recommendations have not been made that reduce the availability of the systems within the solution, due to the activity of some person or system. This includes accidental or malicious activity. 
• Integrity: Verify that recommendations have not been made that may result in a loss of business data integrity. 
• Confidentiality: Ensure that recommendations have not been made that may result in the disclosure of information to unauthorized users. 
• Spoofing: Ensure that recommendations have not been made that may allow a user or system to impersonate an authorized user or system. Ensure that recommendations do not allow for credential theft. 
• Repudiation: Ensure that there is specific and unchangeable proof of critical actions on a server. 

Test Sequence
The test involved the following phases:
1. Build phase: Each test cycle began with this phase. In this phase, the required hardware was installed and connected, network cables were connected, and other hardware configuration was completed. 
2. Build verification testing phase: The test team performed solution configuration using the solution documentation and build verification test cases. This ensured that the systems were built and configured as documented. Build tests quickly exposed human errors made in the guidance as well as errors in the completeness of the deployment guidance that resulted in services not functioning properly. 
3. Functional testing phase: Once build testing was complete, the test team focused on verifying key functions of the products and solution. 
4. Management testing phase: Management testing verified that the requirements of the remote management strategy were met within the solution configuration and design. 
5. Technical writing testing phase: These tests ensured that the communication style and documentation links were correct and consistent. 
6. Security testing phase: The security testing phase was the last phase in each test cycle. This phase ensured that all generated security test cases were executed on the complete end-state environment. 

Test method
A test method is a definitive procedure that produces a test result.
The test result can be qualititive (yes/no), categorical, or quantititive (a measured value). It can be a personal observation or the output of a precision instrument.
Usually the test result is the dependent variable, the measured response based on the particular conditions of the test or the level of the independent variable. Some tests, however, involve changing the independent variable to determine the level at which a certain response occurs: in this case, the test result is the independent variable. 

Components of the Test Strategy document
  1. Scope and Objectives
  2. Business issues
  3. Roles and responsibilities
  4. Communication and status reporting
  5. Test deliverability
  6. Industry standards to follow
  7. Test automation and tools
  8. Testing measurements and metrices
  9. Risks and mitigation
  10. Defect reporting and tracking
  11. Change and configuration management
  12. Training plan.

Testing Methods and Methodologies

Static and Dynamic Analysis 

Static Analysis focuses on the range of methods that are used to determine or estimate software quality without reference to actual executions.  Techniques in this area include code inspection, program analysis, symbolic analysis, and model checking.

Dynamic Analysis deals with specific methods for ascertaining and/or approximating software quality through actual executions, i.e., with real data and under real (or simulated) circumstances.  Techniques in this area include synthesis of inputs, the use of structurally dictated testing procedures, and the automation of testing environment generation.


TESTING METHODS :

Test cases are developed using various test techniques to achieve more effective testing. By this, software completeness is provided and conditions of testing which get the greatest probability of finding errors are  chosen. So, testers do not guess which test cases to chose, and test techniques enable them to design testing conditions in a systematic way. Also, if one combines all sorts of existing test techniques, one will obtain better results rather if one uses just one test technique.

Software  can be tested in two ways, in another words, one can distinguish two different methods:
1. Black box testing, and
2. White box testing.

White box testing is highly effective in detecting and resolving problems, because bugs (bug or fault is a manifestation of an error in a software), can often be found before they cause trouble. We can shortly define this method as testing software with the knowledge of the internal structure and coding inside the program . White box testing is also called white box analysis, clear box testing or clear box analysis. It is a strategy for software debugging (it is the process of locating and fixing bugs in computer program code or the engineering of a hardware device),in which the tester has excellent knowledge of how the program components interact. This method can be used for Web services applications, and is rarely practical for debugging in large systems and networks. Besides, white box testing is considered as a security testing (the process to determine that an  information system protects data and maintains functionality as intended), method that can be used to validate whether code implementation follows intended design, to validate implemented security functionality, and to uncover exploitable vulnerabilities.

Black box testing is testing software based on output requirements and without any knowledge of the internal structure or coding in the program . In another words, a black box is any device whose workings are not understood by or accessible to its user. For example, in telecommunications, it is a resistor connected to a phone line that makes it impossible for the telephone company’s equipment to detect when a call has been answered. In data mining, a black box is an algorithm that doesn't provide an explanation of how it works. In film–making, a black box is a dedicated hardware device:  equipment that is specifically used for a particular function, but in the financial world, it is a computerized trading system that doesn't make its rules easily available. In recent years, the third testing method has been also considered  Gray box testing.  It is defined as testing software while already having some knowledge of its underlying code or logic .  It is based on the internal data structures and algorithms for designing the test cases more than black box testing but less than white box testing.  This method is important when conducting integration testing between two modules of code written by two  different developers, where only interfaces are exposed for test. Also, this method can include reverse engineering to determine boundary values.

Gray box testing is non-intrusive and unbiased because it doesn't require that the tester have access to the source code.The main characteristics and comparison between white box testing and black box testing are follows.

Black Box Testing Versus White Box Testing:

Black Box Testing:
 Performing the tests which exercise all functional requirements of a program;
 Finding the following errors:
1. Incorrect or missing functions;
2. Interface errors;
3. Errors in data structures or external database access;
4. Performance errors;
5. Initialization and termination errors.
 Advantages of this method:
 The number of test cases are reduced to achieve reasonable testing;
 The test cases can show presence or absence of classes of errors.

White Box Testing:
 Considering the internal logical arrangement of software;
 The test cases exercise certain sets of conditions and loops;
 Advantages of this method:
 All independent paths in a module will be exercised at least once;
 All logical decisions will be exercised;
 All loops at their boundaries will be executed;
 Internal data structures will be exercised to maintain their validity

Equivalence Partitioning:

This technique divides the input domain of a program onto equivalence classes.
Equivalence classes – set of valid or invalid states for input conditions, and can be defined in the following way:
1. An  input condition specifies a range → one valid and two invalid equivalence classes are defined;
2. An input condition needs a specific value → one valid and two invalid equivalence classes are defined;
3. An input condition specifies a member of a set → one valid and one invalid equivalence class are defined;
4. An input condition is Boolean  → one valid and one invalid equivalence class are defined.

Well, using this technique, one can get test cases which identify the classes of errors.

Boundary Value Analysis

This technique is like the technique Equivalence Partitioning, except that for creating the test cases beside  input domain use output domain.
One can form the test cases in the following way:
1. An input condition specifies a range bounded by values a and b  → test cases should be made with values just above and just below a and b, respectively;
2. An input condition specifies various values → test cases should be produced to exercise the minimum and maximum numbers;
3. Rules 1 and 2  apply to output conditions;
If internal program data structures have prescribed boundaries, produce test cases to exercise that data structure at its boundary.

What is Software Testing Methodologies?


In the field of Software testing we use different types of Software Testing Methodologies. In today’s Software Testing Class, we will see what all Software Testing Methodologies & software testing technique is used in the day today software testing life cycle.

In the Software Development Process different software development approaches are used. A software development process also known as a Software Development Life Cycle (SDLC).

Each process model has its own advantages & disadvantages, the choosing of model is based on the requirement & need of your project to do the success in process of software development.
Here are the few commonly used Software Development Life Cycle used in actual testing:

  1. Waterfall model
  2. V model
  3. Agile model
  4. Spiral model
  5. RUP
  6. RAD
1. Waterfall Model

The Waterfall Model approach is most basic life cycle model, which is the first Process Model begins and used broadly in Software Development to make sure project success. This model is developed by Winston Royce in the early 1970. Waterfall model is software development process sequential process, as flowing progressively downwards like waterfall via multiple phases & these simple sequence of phases has its own defines activities and goals. The Waterfall model is divided into following separate phases:


  • Requirement Gathering & Analysis phase,
  • Software Design,
  • Implementation and Testing
  • Maintenance
All these phases are the sequential phases & next step is totally depends on the previous step, so that second phase is begins as only if the defined set of objectives and goals are completed first.

The stages of “The Waterfall Model” are:

Requirement Gathering & Analysis:
This is the starting phase of the SDLC in which all possible system requirements are captured & analyzed. Software requirements specification includes the complete information about how actual end users are expecting from the system. This document covers all the necessary requirements for the development of project. Finally after completion of requirement gathering & analysis (validation of requirement against the user needs), a Requirement Specification document is created which give out as a input to the next phase of SDLC. In this model once we moved to the next phase then it won’t possible to add or update the requirements.

System & Software Design: Prior to start actual coding, it is mandatory to be aware of what all features we are going to implement & how it would look like? The requirement specifications document created in the first phase is used as the input to this phase & based on this the system design specifications would be prepared. In which all hardware & system requirements would be specified. The system design specifications document prepared in this phase is used as input for the Implementation & Testing phase model.

Implementation & Unit Testing: Upon getting the system design specifications document the actual coding would be started. Before starting the actual coding requirements are divided into the models/units. In the actual coding the initially develop the small programs called units. After implementing all units the integration would be started in the next phase. The developed unit’s model functionality is tested separately in this phase to check whether the unit models are meets the specified requirements & this individual model testing is called as Unit Testing.

Integration & System Testing: In the previous model the system requirements are divided into models & each model is developed & tested separately. In this phase all units are integrated & done the system testing to check whether the all models/units are integrated properly or not & the system as whole doing as mention as per the system requirement document, so we call this phase as the Integration & System Testing. Upon complete testing of software is done then actual Software is successfully send to customer.

Operations & Maintenance: This phase is the never ending phase of the Waterfall Model. The problems are comes in picture after Implementation & Unit Testing phase. The issues found after the implementation phase i.e. not found in the period of the development life cycle. Some of the issues are not catch after testing cycle done so those are implemented in the maintenance phase, so this phase is called as Operations & Maintenance phase.

Advantages and Disadvantages of Waterfall Model:

Advantages of Waterfall Model:
  1. This is linear simple model to implement & easy to maintain.
  2. In the SDLC initial phase spent time on reviewing requirements and design which saves the time later.
  3. Required resources are minimum in this model as compare to other.
  4. After every phase of the model a document in created which help & simpler to understand & design the system.
  5. Upon completion of coding, is done to check for implemented code or correctness of system.
  6. For each stage deadlines can be set which will help to develop the system on decided time frame.
Disadvantages of Waterfall Model: 
  1. The biggest disadvantages of such system is it won’t allow to go back. If the problems in the design phase which creates complication in the implementation phase.
  2. This model is rigid model. Not flexible & make changes is not possible in the development of system.
  3. Unable to start the next phase before completing the previous phase so time consuming.
  4. In the deployment phase all requirements are not covered or all requirements are not cover so adding such requirements may create unsuitable system.
  5. To make it customer happy such new requirement need to be implemented in new version of system which leads to added cost to system development.
2. V-Model 

In the basic Waterfall model process seen some disadvantages or limitations in the model which started a new SDLC model. As we seen in the Waterfall model the issues found in the end of the SDLC, this is due to the testing is occurred in the end phases of the you SDLC. To overcome this problem the V-Model is comes into the picture. It is always better to introduce testing in the early phase of SDLC, as in this model the testing activity gets started from the early phase of the SDLC.


Before starting the actual testing, testing team has to work on various activities like preparation of Test Strategy, Test Planning, Creation of Test cases & Test Scripts which is work parallel with the development activity which help to get the test deliverable on time.

In the V Model Software Development Life Cycle, based on same information(requirement specification document) the development & testing activity is started. Based on the requirement document developer team started working on the design & after completion on design start actual implementation and testing team starts working on test planning, test case writing, test scripting. Both activities are working parallel to each other. In Waterfall model & V-model they are quite similar to each other. As it is most popular Software Testing Life Cycle model so most of the organization is following this model.

The V-model is also called as Verification and Validation model. The testing activity is perform in the each phase of Software Testing Life Cycle phase. In the first half of the model validations testing activity is integrated in each phase like review user requirements, System Design document & in the next half the Verification testing activity is come in picture.

Typical V-model shows Software Development activities on the Left hand side of model and the Right hand side of the model actual Testing Phases can be performed.

In this process “Do-Procedure” would be followed by the developer team and the “Check-Procedure” would be followed by the testing team to meets the mentioned requirements.

In the V-Model software development life cycle different steps are followed however here we will taking a most common type of V-model example. The V-model typically consist of the following phases:

1. Unit Testing: Preparation of Unit Test Cases
2. Integration Testing: Preparation of Integration Test Cases
3. System Testing: Preparation of System test cases
4. Acceptance Testing: Preparation of Acceptance Test Cases


Agile Methodology

What Is Agile?
Agile methodology is an alternative to traditional project management, typically used in software development. It helps teams respond to unpredictability through incremental, iterative work cadences, known as sprints. Agile methodologies are an alternative to waterfall, or traditional sequential development.


There are two methods by which this methodology can be implemented:-
  1. Scrum
  2. Extreme Programming
Scrum: Each iteration would called a scrum which can be a 1-2 Months.In Scrum Client prioritise his requirements what he want first. If developer did not meets all the requirement which was being fixed for a particular scrum than rest of the development part would be transferred to the next scrum (would be delivered in the next build),  means developer can't increase time decided for a scrum.Its fixed.

Extreme Programming (XP): here iteration period would be less then in scrum , which is being 2-4 weeks.Here developer prioritise what to do first on the basis of client requirement. This duration which was being fixed for a iteration, can be increase if the some development part is still pending. The build would deployed with having all the client needs.Thus iteration period is not fixed here it can be increase. at iteration should meets all the client's requirement in this build.

More attension is required for testing in XP.

Wednesday, December 12, 2012

Manual Testing Questions and Answers:

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. Judgment 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 makes a good QA or Test manager? 
A good QA, test, or QA/Test(combined) manager should:
• be familiar with the software development process
• be able to maintain enthusiasm of their team and promote a positive atmosphere, despite
• what is a somewhat 'negative' process (e.g., looking for or preventing problems)
• be able to promote teamwork to increase productivity
• be able to promote cooperation between software, test, and QA engineers
• have the diplomatic skills needed to promote improvements in QA processes
• have the ability to withstand pressures and say 'no' to other managers when quality is insufficient or QA processes are not being adhered to
• have people judgement skills for hiring and keeping skilled personnel
• be able to communicate with technical and non-technical people, engineers, managers, and customers.
• be able to run meetings and keep them focused

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 Bookstore 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.
'Agile' methods such as XP use methods requiring close interaction and cooperation between programmers and customers/end-users to iteratively develop requirements. The programmer uses 'Test first' development to first create automated unit testing code, which essentially embodies the requirements.

What steps are needed to develop and run software tests?
The following are some of the steps to consider:
• Obtain requirements, functional design, and internal design specifications and other necessary documents
• Obtain budget and schedule requirements
• Determine project-related personnel and their responsibilities, reporting requirements, required standards and processes (such as release processes, change processes, etc.)
• Identify application's higher-risk aspects, set priorities, and determine scope and limitations of tests
• Determine test approaches and methods - unit, integration, functional, system, load, usability tests, etc.
• Determine test environment requirements (hardware, software, communications, etc.)
• Determine testware requirements (record/playback tools, coverage analyzers, test tracking, problem/bug tracking, etc.)
• Determine test input data requirements
• Identify tasks, those responsible for tasks, and labor requirements
• Set schedule estimates, timelines, milestones
• Determine input equivalence classes, boundary value analyses, error classes
• Prepare test plan document and have needed reviews/approvals
• Write test cases
• Have needed reviews/inspections/approvals of test cases
• Prepare test environment and testware, obtain needed user manuals/reference documents/configuration guides/installation guides, set up test tracking processes, set up logging and archiving processes, set up or obtain test input data
• Obtain and install software releases
• Perform tests
• Evaluate and report results
• Track problems/bugs and fixes
• Retest as needed
• Maintain and update test plans, test cases, test environment, and testware through life cycle

What is verification? validation?
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. Validation typically involves actual testing and takes place after verifications are completed. The term 'IV & V' refers to Independent Verification and Validation.

Explain in short, sanity testing, adhoc testing and smoke testing.
Sanity testing is a basic test, which is conducted if all the components of the software can be compiled with each other without any problem. It is to make sure that there are no conflicting or multiple functions or global variable definitions have been made by different developers. It can also be carried out by the developers themselves.
Smoke testing on the other hand is a testing methodology used to cover all the major functionality of the application without getting into the finer nuances of the application. It is said to be the main functionality oriented test.
Ad hoc testing is different than smoke and sanity testing. This term is used for software testing, which is performed without any sort of planning and/or documentation. These tests are intended to run only once. However in case of a defect found it can be carried out again. It is also said to be a part of exploratory testing.


Priority and Severity 
Severity defines the impact that a given defect has on the system. A severe defect may cause the system to crash or invoke the dreaded blue screen of death. I don't think anyone would argue about it's severity. But how did it happen? Did it take an obscure set of key strokes or does it happen anytime the uses presses "e"? Or does it only happen only in the month of June, during sunspot activity? What about a spelling error? Or maybe the text color is a really annoying neon green. Severe? Probably not. Maybe just a cosmetic issue.

Priority, on the other hand, defines the order in which we should resolve a defect. Should we fix it now, or can it wait? How difficult is it to resolve? How many resources will be tied up by the resolution. Look at our two previous examples. Issue 1 (system crash) is definately severe, may be difficult to resolve, but only happens rarely. When should we fix it? Contrast that with the second issue (spelling error). Not severe, just makes you look bad. Should be a real easy fix. One developer, maybe 10 minutes to fix, another 10 to validate (if that). Which should get the higher Priority? Which should we fix now? I'm going to recommend fixing the typo immediately, and if there is sufficient time, fix and resolve the blue screen before the next build. I will probably wait until the next major release. It becomes....a Release Note!


Software Development Life Cycle(SDLC) Vs Software Test Life Cycle(STLC)

Software development life cycle(SDLC) and Software Testing Life cycle(STLC) go parallelly.
SDLC (Software Development Life cycle)STLC (Software Test Life Cycle)
SDLC is Software Development LifeCycle, it is a systematic approach to develop a software.
The process of testing a software in a well planned and systematic way is known as software testing life cycle(STLC).
Requirements gathering
Requirements Analysis is done is this phase, software requirements are reviewed by test team.
Design
Test Planning, Test analysis and Test design is done in this phase. Test team reviews design documents and prepares the test plan.
Coding or development
Test construction and verification is done in this phase, testers write test cases and finalizes test plan.
Testing
Test Execution and bug reporting, manual testing, automation testing is done, defects found are reported. Re-testing and regression testing is also done in this phase.
Deployment
Final testing and implementation is done is this phase andfinal test report is prepared.
Maintenance
Maintenance testing is done in this phase.

CMMI Model :

CMMI models there are six capability levels which are designated by the digits from 0 to 5

Capability Level 0: Incomplete
It is a process which is not performed fully or partially. One or more specific goals of the process area would not be satisfied and generic goals do not exist for this level.

Capability Level 1: Performed
This level is expected for performing all the level specific practices. Stable or non-met specific objectives such as quality, cost, and schedule may not be performed well, but the work done is useful. Something is done but could not prove that it will really work for.

Capability Level 2: Managed
It is a process which is planned, performed, monitored and controlled for individual projects or groups or could be stand-alone processes for achieving a given need. Both the model objectives for the process and other related objectives like cost, schedule and quality are managed in this process. The things that are to be managed in an enterprise are managed actively in this level. There are certain metrics which are to be collected consistently and applied for management approach.

Capability Level 3: Defined
This process is characterized as a “well defined process”. It is referred as a managed process which is tailored for the standards of the organization as per the tailoring guidelines of the organization and the work products, measures and other process related improvement information are contributed.

Capability Level 4: Quantitatively Managed
This process is defined as a process which is properly controlled using statistical and other quantitative techniques. Quality and process performance are established and utilized as the major criteria in process management. The quality of process performance is estimated in statistical terms. This quality is managed throughout the process life cycle.

Capability Level 5: Optimizing
It is a quantitatively managed process which is improved that is based on an understanding the process variation inherent cause in the process. The focus is on continually improving the performance of the process by both incremental and innovative improvements. The target of these processes is activities improvement..

Bug Life Cycle:

Bug can be defined as the abnormal behavior of the software. No software exists without a bug. The elimination of bugs from the software depends upon the efficiency of testing done on the software. A bug is a specific concern about the quality of the Application under Test (AUT).

In software development process, the bug has a life cycle. The bug should go through the life cycle to be closed. A specific life cycle ensures that the process is standardized. The bug attains different states in the life cycle. The life cycle of the bug can be shown diagrammatically as follows:

The different states of a bug can be summarized as follows:

1. New
2. Open
3. Assign
4. Test
5. Verified
6. Deferred
7. Reopened
8. Duplicate
9. Rejected and
10. Closed
Description of Various Stages:

1. New: When the bug is posted for the first time, its state will be “NEW”. This means that the bug is not yet approved.

2. Open: After a tester has posted a bug, the lead of the tester approves that the bug is genuine and he changes the state as “OPEN”.

3. Assign: Once the lead changes the state as “OPEN”, he assigns the bug to corresponding developer or developer team. The state of the bug now is changed to “ASSIGN”.

4. Test: Once the developer fixes the bug, he has to assign the bug to the testing team for next round of testing. Before he releases the software with bug fixed, he changes the state of bug to “TEST”. It specifies that the bug has been fixed and is released to testing team.

5. Deferred: The bug, changed to deferred state means the bug is expected to be fixed in next releases. The reasons for changing the bug to this state have many factors. Some of them are priority of the bug may be low, lack of time for the release or the bug may not have major effect on the software.

6. Rejected: If the developer feels that the bug is not genuine, he rejects the bug. Then the state of the bug is changed to “REJECTED”.

7. Duplicate: If the bug is repeated twice or the two bugs mention the same concept of the bug, then one bug status is changed to “DUPLICATE”.

8. Verified: Once the bug is fixed and the status is changed to “TEST”, the tester tests the bug. If the bug is not present in the software, he approves that the bug is fixed and changes the status to “VERIFIED”.

9. Reopened: If the bug still exists even after the bug is fixed by the developer, the tester changes the status to “REOPENED”. The bug traverses the life cycle once again.

10. Closed: Once the bug is fixed, it is tested by the tester. If the tester feels that the bug no longer exists in the software, he changes the status of the bug to “CLOSED”. This state means that the bug is fixed, tested and approved.

While defect prevention is much more effective and efficient in reducing the number of defects, most organization conducts defect discovery and removal. Discovering and removing defects is an expensive and inefficient process. It is much more efficient for an organization to conduct activities that prevent defects.
Guidelines on deciding the Severity of Bug:

Indicate the impact each defect has on testing efforts or users and administrators of the application under test. This information is used by developers and management as the basis for assigning priority of work on defects.

A sample guideline for assignment of Priority Levels during the product test phase includes:

1. Critical / Show Stopper — An item that prevents further testing of the product or function under test can be classified as Critical Bug. No workaround is possible for such bugs. Examples of this include a missing menu option or security permission required to access a function under test.
2. Major / High — A defect that does not function as expected/designed or cause other functionality to fail to meet requirements can be classified as Major Bug. The workaround can be provided for such bugs. Examples of this include inaccurate calculations; the wrong field being updated, etc.
3. Average / Medium — The defects which do not conform to standards and conventions can be classified as Medium Bugs. Easy workarounds exists to achieve functionality objectives. Examples include matching visual and text links which lead to different end points.
4. Minor / Low — Cosmetic defects which does not affect the functionality of the system can be classified as Minor Bugs

Differences between Bug, Defect and Error??

defect - Is something what went wrong without us expecting it. E.G.: Application crashes when I press "Save" button when registering myself somewhere.

bug is the part of code which causes the defect (e.g. the "save" method refers to unexisting database)

issue is what you are going to raise to the issue tracking system - you will write the set of steps needed to reproduce the defect, in order the bug can be found and fixed. (e.g. Issue 001, Critical, "Save new user does not work")

error Means something went wrong, but we expected it. E.G.: When filling my name, I entered only numbers - the application then shows me an error message, that I need to correct the field "name" prior continuing.


What is a Traceability Matrix / Requirements Traceability Matrix?
The concept of Traceability Matrix is to be able to trace from top level requirements to implementation, and from top level requirements to test.

A traceability matrix is a table that traces a requirement to the tests that are needed to verify that the requirement is fulfilled. A good traceability matrix will provide backward and forward traceability, i.e. a requirement can be traced to a test and a test to a requirements. The matrix links higher level requirements, design specifications, test requirements, and code files. It acts as a map, providing the links necessary for determining where information is located. This is also known as Requirements Traceability Matrix or RTM.

This is mostly used for QA so that they can ensure that the customer gets what they requested. The Traceability matrix also helps the developer find out why some code was implemented the way it was, by being able to go from code to Requirements. If a test fails, it is possible to use the traceability matrix to see what requirements and code the test case relates to.

The goal of a matrix of this type is -
1. To make sure that the approved requirements are addressed/covered in all phases of development: From SRS to Development to Testing to Delivery.
2. That each document should be traceable: Written test cases should be traceable to its requirement specification. If there is new version then updated test cases should be traceable with that.