Friday, 27 February 2015

Common Check List For Testing a Application

The Complete Checklist (Test Cases) for Most Common Components of AUT

Note: You can use these checklists as it is in Microsoft Excel format (download provided at the end of the article). You can even track the test execution in same file with pass/fail result and status.
This could be an all-in-one resource for QA teams to test and track the most common components of AUT.  You can add or update test cases specific to your application and make it even more comprehensive list.

Checklist #1: For a module, we have to check the below points:

Module Name:
Module Functionality:
Module Impact over the application:
Module Flow:
Menu & Submenu:
Spellings and Order & Suitability:
Control for each sub menu:

Checklist #2: For each screen, we have to verify the below points

Form Functionality:
Form Impact over the application:
Form Flow:
Designing:
Alignments:
Title:
Field Names:
Spellings:
Mandatory Marks:
Alerts of Mandatory fields:
Buttons:
Default Cursor Position:
Tab Sequence:
Page before entering any data:
Page after entering data:

Checklist #3: For each text box in the screen we have to verify the below points

Text Box:
ADD(In add screen)EDIT (in Edit screen)
Characters
Special Characters
Numbers
Limit
Alert
Spelling & Grammar in Alert message:
BVA (Size) for Text Box:
Min —>—> Pass
Min-1 —> —> Fail
Min+1 —> —> Pass
Max-1 —> —> Pass
Max+1 —> —> Fail
Max —> —> Pass
ECP for Text Box:
 Valid In Valid
 - -
 - -

Checklist #4: For each list box/drop down in the screen we have to verify the below points

List Box/Dropdown:
ADD(In add screen)EDIT (in Edit screen)
Header
Correctness of Existed Data
Order of Data
Selection and Deselect ion
Alert:
Spelling and Grammar of Alert message
Cursor after alert
Reflection of Selection and De selection in remaining fields

Checklist #5: For each Check box in the screen we have to verify the below points

Check Box:
ADD(In add screen)EDIT (in Edit screen)
Default Selection
Action after selection
Action after de-selection
Selection and Deselect ion
Alert:
Spelling and Grammar of Alert message
Cursor after alert
Reflection of Selection and De selection in remaining fields

Checklist #6: For each Radio button in the screen we have to verify the below points

Radio button:
ADD(In add screen)EDIT (in Edit screen)
Default Selection
Action after selection
Action after de-selection
Selection and Deselect ion
Alert:
Spelling and Grammar of Alert message
Cursor after alert
Reflection of Selection and De selection in remaining fields

------------

Checklist #7: For each date field in the screen we have to verify the below points

Date field:
ADD(In add screen)EDIT (in Edit screen)
Default date display
Design of calendar
Navigation for different months and years in date control
Manual Entry in date text box
Date format and uniformity with overall application
Alert:
Spelling and Grammar of Alert message
Cursor after alert
Reflection of Selection and De selection in remaining fields

Checklist #8: For each save button in the screen we have to verify the below points

Save/update:
ADD(In add screen)EDIT (in Edit screen)
Without giving any data:
With only mandatory fields:
With All fields:
With Max limit:
With min limit
Spelling & Grammar in Confirmation  Alert message:
Cursor
Duplication of Unique fields:
Spelling & Grammar in duplication Alert message:
Cursor

Checklist #9: For each Cancel button in the screen we have to verify the below points

Cancel:
With data in all fields
With only mandatory fields:
With All fields:

Checklist #10: For each Delete button in the screen we have to verify the below points

Delete:
EDIT (in Edit screen)
Delete the record which is not used anywhere in the application
Delete the record which has dependency
Add the new record with same deleted details again

Checklist #11: To verify impacted areas after saving/updating

After Saving/updating:
Display in View
Reflection in impacted forms in the application

Checklist #12: For each data grid in the screen we have to verify the below points

Data Grid:
Grid Title and spelling
Form Before giving any data
Message Before giving any data
Spellings
Alignments
S No
Field Names & Order
Correctness of Existed data
Order of Existed data
Alignment of Existed data
Page navigators
Data when navigating with different pages
Edit Link Functionality
Page after Edit:
Title and spellings
Existed data of Selected record in each field
Buttons
While this list might not be exhaustive, it is indeed extensive
http://www.softwaretestinghelp.com/100-ready-to-execute-test-cases-checklists/

Thursday, 26 February 2015

Web Testing Scenarios

Web Testing
During testing the websites the following scenarios should 
be considered. Functionality Performance Usability Server side interface Client side compatibility Security

Functionality: 
In testing the functionality of the web sites the following 
should be tested.
 Links 
 Internal links 
 External links 
 Mail links 
 Broken links 
 Forms 
 Field validation 
 Functional chart 
 Error message for wrong input 
 Optional and mandatory fields 
 Database 
 Testing will be done on the database integrity. 
 Cookies 
 Testing will be done on the client system side, on the 
temporary internet files. 

Performance: 
Performance testing can be applied to understand the web 
site's scalability, or to benchmark the performance in the 
environment of third party products such as servers and 
middleware for potential purchase. Connection speed: 
o   Tested over various Networks like Dial up, ISDN etc Load 
o   What is the no. of users per time? 
o   Check for peak loads & how system behaves. 
o   Large amount of data accessed by user. Stress 
o   Continuous load 
o   Performance of memory, cpu, file handling etc. 

Usability : 
Usability testing is the process by which the human-
computer interaction characteristics of a system are 
measured, and weaknesses are identified for correction.
Usability can be defined as the degree to which a given 
piece of software assists the person sitting at the 
keyboard to accomplish a task, as opposed to becoming an 
additional impediment to such accomplishment. The broad 
goal of usable systems is often assessed using several 
criteria:Ease of learning Navigation Subjective user satisfaction General appearance 

Server side interface: 
In web testing the server side interface should be tested. 
This is done by
Verify that communication is done properly.
Compatibility of server with software, hardware, network 
and database should be tested.
The client side compatibility is also tested in various 
platforms, using various browsers etc.

Security: 
The primary reason for testing the security of an web is to 
identify potential vulnerabilities and subsequently repair 
them. 
The following types of testing are described in this 
section: Network Scanning Vulnerability Scanning Password Cracking Log Review Integrity Checkers Virus Detection

Performance Testing 
Performance testing is a rigorous usability evaluation of a 
working system under realistic conditions to identify 
usability problems and to compare measures such as success 
rate, task time and user satisfaction with requirements.
The goal of performance testing is not to find bugs, but to 
eliminate bottlenecks and establish a baseline for future 
regression testing.

To conduct performance testing is to engage in a carefully 
controlled process of measurement and analysis. Ideally, 
the software under test is already stable enough so that 
this process can proceed smoothly.
A clearly defined set of expectations is essential for 
meaningful performance testing.
For example, for a Web application, you need to know at 
least two things:expected load in terms of concurrent users or HTTP 
connections acceptable response time 

Load testing:
Load testing is usually defined as the process of 
exercising the system under test by feeding it the largest 
tasks it can operate with. Load testing is sometimes called 
volume testing, or longevity/endurance testing
Examples of volume testing:testing a word processor by editing a very large 
document testing a printer by sending it a very large job testing a mail server with thousands of users mailboxes 
Examples of longevity/endurance testing:testing a client-server application by running the 
client in a loop against the server over an extended period 
of time 

Goals of load testing:Expose bugs that do not surface in cursory testing, 
such as memory management bugs, memory leaks, buffer 
overflows, etc. 
ensure that the application meets the performance baseline 
established during Performance testing. This is done by 
running regression tests against the application at a 
specified maximum load. 
Although performance testing and load testing can seen 
similar, their goals are different. On one hand, 
performance testing uses load testing techniques and tools 
for measurement and benchmarking purposes and uses various 
load levels whereas load testing operates at a predefined 
load level, the highest load that the system can accept 
while still functioning properly. 

Stress testing: 
Stress testing is a form of testing that is used to 
determine the stability of a given system or entity. This 
is designed to test the software with abnormal situations. 
Stress testing attempts to find the limits at which the 
system will fail through abnormal quantity or frequency of 
inputs. 
Stress testing tries to break the system under test by 
overwhelming its resources or by taking resources away from 
it (in which case it is sometimes called negative testing). 
The main purpose behind this madness is to make sure that 
the system fails and recovers gracefully -- this quality is 
known as recoverability.
Stress testing does not break the system but instead it 
allows observing how the system reacts to failure. Stress 
testing observes for the following.Does it save its state or does it crash suddenly? Does it just hang and freeze or does it fail 
gracefully? 
Is it able to recover from the last good state on restart? 
Etc.

Compatability Testing 
A Testing to ensure compatibility of an application or Web 
site with different browsers, OS and hardware platforms. 
Different versions, configurations, display resolutions, 
and Internet connect speeds all can impact the behavior of 
the product and introduce costly and embarrassing bugs. We 
test for compatibility using real test environments. That 
is testing how will the system performs in the particular 
software, hardware or network environment. Compatibility 
testing can be performed manually or can be driven by an 
automated functional or reg The purpose of compatibility 
testing is to reveal issues related to the product’s 
interaction ression test suite.with other software as well 
as hardware. The product compatibility is evaluated by 
first identifying the hardware/software/browser components 
that the product is designed to support. Then a 
hardware/software/browser matrix is designed that indicates 
the configurations on which the product will be tested. 
Then, with input from the client, a testing script is 
designed that will be sufficient to evaluate compatibility 
between the product and the hardware/software/browser 
matrix. Finally, the script is executed against the matrix, 
and any anomalies are investigated to determine exactly 
where the incompatibility lies. 
Some typical compatibility tests include testing your 
application: On various client hardware configurations Using different memory sizes and hard drive space On various Operating Systems In different network environments With different printers and peripherals (i.e. zip 
drives, USB’s, etc.)

Basics of Mobile Application Testing

 What is Mobile Application Testing?

It is a process to test mobile applications for its functionality, usability and consistency. Any mobile application will either come pre-installed or can be installed from mobile software distribution platform.

Different types of testing that can be done for any Mobile Application

  1. Installation Testing :  This process should be user friendly and should consume less time during the process of installation in the device.
  2. Functional Testing :  It focuses on functioning of the application.
  3. Stress / Performance Testing :  It focuses on the performance and load that an application can take while performing.
  4. Power Consumption Testing :  It focuses on mobile battery power consumption while the application is running.
  5. Interrupt Testing :  Any interrupt caused due to activities such as phone calls, SMS or MMS, battery down, Network not found etc.
  6. Usability Testing :  It should satisfy all user requirements and its a key to the success of any application.

1. Installation Testing

Installing any mobile app should be very simple and we should display the progress of the installation with proper information. So the user does not keep guessing when will the installation get completed.

2. Functional Testing

This is completely dependent on the functioning of the application. Following key points should be taken care of when doing functional testing of the any mobile app.
  1. Make sure all the functional flow of the application works as per the business logic.
  2. The application developed must be tested thoroughly in all major devices for its functionality.
  3. If the memory is full still the application should work properly.
  4. If application is integrated with any e-pay/payment gateway then it should make sure that the data is highly secured.
  5. If application supports multiple orientation then the app should function accordingly.
  6. If application is forcefully stopped during page loading or navigating then it should provide proper informative message.
  7. Application should not crash any time and if it happens then we should debug the scenario why, where and how it crashed.
  8. Monkey testing must be performed by the QA.

3. Stress/Performance Testing

The most painful part of any application is stress & performance testing and it should be handled efficiently.
  1. It finds the exception which are unnoticed during functional and user interface testing.
  2. Application should be capable of handling 20% more than the maximum expected load.
  3. If a user performs same operation again and again then it should not crash or get hanged.
  4. If multiple applications are running at a time in the device then our application should be smart enough to release the phone’s memory for other applications when our app is in background and when our app is active then it should work without any abnormal behaviour.
  5. The load time should not be too much.
  6. Negative test cases should always be performed for better performance of the application.
  7. When battery is low and the app is running, verify that the app runs perfectly without any crashes or limitations imposed by OS of that device.

4. Power Consumption Testing

  • To start this testing, make sure mobile device  is charged to 100%, so it is easy to measure the power consumption.
  • Make a note of the time, when you start the app and its testing.
  • Perform the tests with different scenarios and based on the start time and ending time, measure the battery power consumption.

5. Interrupt Testing

There are different external factors which can be very crucial and should be considered while developing any application.
Network Connection type : Application should easily run on Wi-Fi or 4G or 3G or 2G connections.
  • If a device moves out of any network then it should automatically switch to other network.
  • If there is no SIM card in the device then also the app should work properly ( provided it is independent of Mobile Service Network ).
  • If Airplane mode is active then also app should work properly ( provided it is independent of any data service requirements ). And if there is any function dependent on it and not working then it should provide proper information to the user.
SD Card Interaction : This factor can play a vital role in the mobile device.
  • The application should provide user friendly message when any function cannot be performed due to missing SD card.
  • App should provide an option to move the app to SD card and its functioning should also be proper.
Phone calls and other interruption
  • When working with any application and there is any interruption due to any phone calls or other reasons then the application should go in paused mode and run in background. And after that interruption is over, app should return back to foreground but in pause mode.

6. Usability Testing

The most important factor which should be taken extra care while developing a mobile application is its usability. The success and failure of any application depends on its User Interface.
  • UI of the app should be as per device screen size and no text/control should be cutting off.
  • Text should be readable.
  • Provide progress indicator if the app/page is loading. So user is aware that the app is fetching some data.
  • Button size should be proper and large enough that it should be easily clickable by the large fingertip and spacing between 2 buttons should also be good enough.
So this is it in the basics of any mobile application testing from my side. I know that I have left other QA areas in this article which also needs to be tested in any mobile app. I will try to cover those in my next article. Till that time if you have any queries or feedback, drop it in comments section.

Wednesday, 25 February 2015

MY Notes on Selenium Web Driver

                



**WebDriver doesn't support record and playback feature.
**WebDriver is a purely object oriented tool.
**Captcha and Bar code readers cannot be tested using Selenium.
**windows pop up cannot be handled using Selenium.
**Single Slash “/” – Single slash is used to create Xpath with absolute path.
**Double Slash “//” - Double slash is used to create Xpath with relative path.
**find if an element in displayed on the screen?
isSelected()
isEnabled()
isDisplayed():
boolean buttonPresence = driver.findElement(By.id(gbqfba”)).isDisplayed();
**To get a text of a web element?
String Text = driver.findElement(By.id(“Text”)).getText();
**To select value in a dropdown?
selectByValue:
Select selectByValue = new Select(driver.findElement(By.id(“SelectID_One”)));
selectByValue.selectByValue(greenvalue”);

selectByVisibleText:
Select selectByVisibleText = new Select (driver.findElement(By.id(“SelectID_Two”)));
selectByVisibleText.selectByVisibleText(“Lime”);

selectByIndex:
Select selectByIndex = new Select(driver.findElement(By.id(“SelectID_Three”)));
selectByIndex.selectByIndex(2);
**Different types of navigation commands?
navigate().back(
navigate().forward()
navigate().refresh()
navigate().to()
driver.navigate().back();
**To click on a hyper link using linkText?
driver.findElement(By.linkText(“Google”)).click();
**When do we use findElement() and findElements()?
findElement():-first matching element would be fetched.
findElements():-It is used to find all the elements in the current web page.
**Difference between driver.close() and driver.quit command?
driver.close()- closes the web browser window that the user is currently working.
driver.quit()- closes down all the windows that the program has opened.
**How can we handle web based pop up?
void dismiss() – The dismiss() method clicks on the “Cancel” button as soon as the pop up window appears.
void accept() – The accept() method clicks on the “Ok” button as soon as the pop up window appears.
String getText() – The getText() method returns the text displayed on the alert box.
void sendKeys(String stringToSend) – The sendKeys() method enters the specified string pattern into the alert box.
**How to assert title of the web page?
//verify the title of the web page
assertTrue(“The title of the window is incorrect.”,driver.getTitle().equals(“Title of the page”));
**How to retrieve css properties of an element?
driver.findElement(By.id(“id“)).getCssValue(“name of css attribute”);
driver.findElement(By.id(“id“)).getCssValue(“font-size”);
**How to capture screenshot in WebDriver?
    @Test
      public void test() throws IOException 
{
        // Code to capture the screenshot
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
        // Code to copy the screenshot in the desired location
FileUtils.copyFile(scrFile, new File("C:\\CaptureScreenshot\\google.jpg"));                  
    }
}
**How to set test case priority in TestNG?
package TestNG;
import org.testng.annotations.*;
public class SettingPriority {
      @Test(priority=0)
      public void method1() {   
      }
      @Test(priority=1)
      public void method2() {  
      }
      @Test(priority=2)
      public void method3() {  
}
}
**Advantage of Test Automation framework

Reusability of code
Maximum coverage
Recovery scenario
Low cost maintenance
Minimal manual intervention
Easy Reporting
**What are the different types of frameworks?

Module Based Testing Framework: The framework divides the entire “Application Under Test” into number of logical and isolated modules. For each module, we create a separate and independent test script. Thus, when these test scripts taken together builds a larger test script representing more than one module.
Library Architecture Testing Framework: The basic fundamental behind the framework is to determine the common steps and group them into functions under a library and call those functions in the test scripts whenever required.
Data Driven Testing Framework: Data Driven Testing Framework helps the user segregate the test script logic and the test data from each other. It lets the user store the test data into an external database. The data is conventionally stored in “Key-Value” pairs. Thus, the key can be used to access and populate the data within the test scripts.
Keyword Driven Testing Framework: The Keyword driven testing framework is an extension to Data driven Testing Framework in a sense that it not only segregates the test data from the scripts, it also keeps the certain set of code belonging to the test script into an external data file.
Hybrid Testing Framework: Hybrid Testing Framework is a combination of more than one above mentioned frameworks. The best thing about such a setup is that it leverages the benefits of all kinds of associated frameworks.
Behavior Driven Development Framework: Behavior Driven Development framework allows automation of functonal validations in easily readable and understandable format to Business Analysts, Developers, Testers, etc.

  Selenium IDE is missing certain vital features of a testing tool: conditional statements, loops, logging functionality, 
exception handling, reporting functionality, database testing, 
re-execution of failed tests and screenshots taking capability. 
Selenium IDE doesn't for IE, Safari and Opera browsers.

Selenium IPhone Driver/Android Driver for running tests on Mobile Safari & Android browsers.

Selenium is basically used for the functional/Regression/Integration testing of web based applications & also Selenium is used for UAT (User Acceptance Test)

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

**Assertions
assertTextPresent : This will assert if the text is present in the page.
assertText: This will assert if a particular element is having the particular text.
assertTitle: This will assert if the page is having a proper title.
assertValue: This will assert if a Text box or check box has a particular value
assertElementPresent: This will assert if a particular UI Element is present in the page.

**Selenium WaitFor Commands?
waitForPageToLoad : This command will make the script to wait till the page loads. Syntax is waitForPageToLoad(timeout); Time out is the maximum time the script will wait for the page to load.
waitForAlert : This command will wait for the alert message to appear
waitForTable: This command will wait for the Web table to completely load in the page
waitForTitle: This command will for the page Title to appear on the browser. 
Other waitFor commands : Selenium has several other wait command like waitForText, waitForPopup and so on. These commands are generically called Synchronization commands.