Thursday, December 21, 2017

Top 10 Agile Interview Questions & Answers

1. What is agile methodology and its advantage?

Agile methodology is the continuous iteration of both development and testing activity throughout the software development lifecycle.

Advantage:
The customer gets a chance to look at the product very frequently and make the decision wisely.

2. Tell me the agile ceremonies?
  • Sprint Planning Meeting.
  • Daily Scrum Meeting.
  • Sprint Review Meeting.
  • Sprint Retrospective Meeting,

3. Tell me the agile artifacts?
  • Product Backlog.
  • Sprint Backlog.
  • Product Increment.

4. What is Epic and User-story in agile?

Epic: Epic means big user story and it generally takes two or more sprints to develop and test the particular epic. They are usually broad in scope.

User-story: User-stories are derived from Epic and It has a high-level definition of a requirement.

5. What is burndown chart?

Burndown chart generally shows how quickly and effectively we completing our user stories in each iteration and also, it shows the total amount of work we deliver in each iteration.

6. Difference between Product Backlog and Sprint Backlog?

Product Backlog: Product Backlog is a list where all the details(Epics, User stories) are available to get the end product.

Sprint Backlog: Sprint Backlog generally derived from Product Backlog. During iteration, We will be selecting the stories from the product backlog.

7. What is Definition of Done (DOD)?

Definition of Done is a checklist that is required to develop the product and it's adding value to the product.

Checklists are:
  1. Design Documents.
  2. Coding.
  3. Review Comments.
  4. Unit Testing.
  5. Release Notes.

8. What is Product Increment?

At end of the sprint, The newly developed product must be in usable condition and it should meet the 'Definition of Done' and 'Acceptance Criteria'.

9. What is Sprint Retrospective meeting?

During the 'Sprint Retrospective' meeting, The team will discuss what happended in the iteration and also identifies the list of actions that are needed for improvement going forward.

10. How do you deal when requirements are keeps on changing?

I work closely with Product Owner to understand the changes and then update the test plan & test cases (Initially better to write generic test plan & test cases). Please don't go for automation until requirements are finalized.

Tuesday, December 19, 2017

Test Management Tool - Zephyr

   Import Bulk Test Cases from Excel into JIRA

   1. Launch the Zephyr.jar file.
   2. Enter the Project JIRA URL.
   3. Enter the Username and Password.
   4. Click on Connect.
   5. You can see your current project in the Project drop-down list.
   6. Choose the Issue Type as “Test” in the Issue Type drop-down list.
   7. Click on Discriminator drop-down list and choose as “By Test-case name change”.
   8. Mention the starting row as “2”.
   9. In the JIRA Field table, you can see the required columns for your project.
   10. Create the test case’s in excel with the columns displayed in the JIRA Field Table.
    a.*-Mandatory one.
   11. In the Excel Column Table, we need to Map the excel fields to the proper JIRA fields. To do so, mention the column ids.Example: A, B, C etc..,
   12. Click on Pick Import File button and import the excel sheet.
   13. Click on Start Import button.


Monday, December 18, 2017

Katalon Studio - Open Source Automation Framework for Web, Mobile and API Testing

Introduction:

Katalon Studio is a free and complete automated testing tool for Web testing, Mobile testing and API testing. This tool can be downloaded at the following link https://www.katalon.com/

Key Features of Katalon Studio:
  • Better & Faster results.
  • Hassle-free deployment.
  • Record & Playback.
  • Hand Coding.
  • Quick & easy set-up.
  • Multi-OS & Cross-browser application.
Hands-on with Katalon Studio:

Katalon studio is a user-friendly automation framework that is defined by the simplicity and speed. It is very helpful for automation team and individuals to spend the very minimal efforts from setting up a new project to executing tests and then monitoring execution results.
  1. Pre-defined structure of test artefacts: Test cases, Object Repository, Test suites, Data Files, Checkpoints, Keywords, Test Listeners and Reports.
  2. Custom keywords provide the flexibility in adding additional keywords to test the AUT efficiently for the specific and complex testing purposes.
  3. Support major testing needs: Web, Mobile and API.
  4. Execute multiple test suites at once with test suite collection.
  5. Extend current CI flow easily with console mode execution with no efforts. Executing command line can be generated quickly using 'Generate Command Line for console mode' feature by clicking on Build CMD option.
  6. Detailed Test Suite report reducing time in analyzing results. You can export it to the different format such as CSV, PDF, HTML and store it for later use.
  7. Enable automatic mail triggering functionality and customize email template.

Katalon Studio Workflow:

Initiate:

Integral Project Templates: By offering built-in templates for organizing test cases, test suites, object repository, data files and keywords. It makes automation testing very easier for both automation & manual testers.
Multiple Capabilities: It supports Web, Mobile and API testing on all operating systems.
Simple Deployment: Easy to integrate with Jenkins, GIT and JIRA with native plug-ins.

Create:

Automatic Test Generation: Generates scripts automatically using built-in keywords.
Smart Object Capturing: An advanced recorder detects object properties effectively to maximize recognition.

Operate:

Test execution made powerful: Runs test cases or test suites using multiple configurations and data sets.
Versatility in execution: This tool provides CI integration console with various parameters for remote execution. Runs tests on multiple browsers and operating systems
Flexible failure handling and auto re-execution: Includes run-time rules to automatically handle complex execution flows.

Report:

Reports available in several formats: With advanced logging, debug data, screenshots and enable automatic mail triggering functionality to the peers.

Maintain:

Intelligent test object maintenance: Automatically updates all the associated test files and suites when objects are changed.
Efficient test organization: Allows easy management and maintenance of tests, data and keywords.

Difference between Katalon and UFT/Test Complete:



Thursday, December 14, 2017

Automation Test Approach

Best Practices for Test Automation

  1. Major functionality tests should be identified by the QA team and prioritized according to the business requirements. These scenarios should be reviewed and approved by the Test Lead / Test Manager.
  2. Develop or customize the automation framework which suits the basic automation requirements and identify the test cases which can be automatable.
  3. QA Team starts with developing the automation scripts for the identified high priority test cases.
  4. Checkpoints will be created for each automated script to validate the test results against the input data.
  5. Before check-in the framework, automation scripts or any tools developed by QA Team, it goes through the code review process.
  6. Code review starts with the self-review followed by peer review, as per the defined coding review checklist and guidelines.
  7. Incorporate the review comments and check-in the automation scripts to source control like GIT, TFS and SVN.
  8. Generate test data required for test execution and automate test data preparation.
  9. Setup and validate by executing the automated scripts in the Automation environment.
  10. Execution of the automation scripts on the desired build of the application.

Tuesday, December 12, 2017

Selenium Interview Questions & Answers


1. What is Automation Testing?

Automation testing is a process of simulating the manual process of the application which is under test.

2. What are the benefits of Automation Testing?

Benefits of Automation testing are:
  • Supports execution of repeated test cases.
  • It enables parallel execution.
  • Improves accuracy thereby reducing human-generated errors.
  • Saves time and money.
3. What is Selenium 2.0?

Web Testing tools Selenium RC and WebDriver are consolidated in a single tool in Selenium 2.0.

4. Mention what is Selenium 3.0?

Selenium 3.0 is the latest version of Selenium. It has released 2 beta versions of selenium 3.0.

5. Why Selenium?

It is becoming increasingly popular and it is the first choice of automation testers as well as organizations for automating the testing of Web-based applications for both the GUI as well as the functionality.

6. What are the testing types that can be supported by Selenium?

Selenium supports the following types of testing:
  • Functional Testing.
  • Regression Testing.
7. What are the different types of locators in Selenium?

In Selenium every object or control in a web page is referred as element, there are different ways to find an element on a web page they are
  • ID
  • Name
  • TagName
  • CSS Selector
  • Link text
  • PartialLink Text
  • Xpath etc
8. Mention what is the use of X-path?

XPath means XML Path. X-Path is used to find the WebElement in web pages. It is also useful in identifying the dynamic elements.

The fundamental behind locating elements using XPath is the traversing between various elements across the entire page and thus enabling a user to find an element with the reference of another element.

9. What is the difference between Assert and Verify commands?

Assert: Assert command checks whether the given condition is true or false. Let’s say we assert whether the given element is present on the web page or not. If the condition is true then the program control will execute the next test step but if the condition is false, the execution would stop and no further test would be executed.

Verify: Verify command also checks whether the given condition is true or false. Irrespective of the condition being true or false, the program execution doesn’t halt i.e. any failure during verification would not stop the execution and all the test steps would be executed.

10.  Explain the difference between single and double slash in X-path?

Single slash '/':
  1. Single slash (/) start selection from the document node.
  2. It allows you to create 'absolute' path expressions.
Double Slash '//':
  1. Double slash (//) start selection matching anywhere in the document.
  2. It enables to create 'relative' path expressions.
11. What is same origin policy? How you can avoid same origin policy?

The "Same Origin Policy" is introduced for security reason, and it ensures that content of our application will never be accessible by a script from another application. As per the policy, any code loaded within the browser can only operate within that website’s domain.

To avoid "Same Origin Policy" proxy injection method is used, in proxy injection mode, the Selenium Server acts as a client configured HTTP proxy, which sits between the browser and application and then masks the application under test under a fictional URL.

12. Mention what is the difference between Implicit wait and Explicit wait?

Implicit Wait: Sets a timeout for all successive Web Element searches. For the specified amount of time, it will try looking for element again and again and if the element is not found then it throws a NoSuchElementException.

Explicit Wait: It is a one-timer, used for a particular search.


13. Explain what is the difference between findElement() and findElements()?

findElement(): It finds the single element within the current page using the given “locating mechanism”.It returns a single WebElement
Example: driver.findElement(By.xpath(“//div[@id=’example’]//ul//li”));

findElements(): Using the given “locating mechanism” find all the elements on the current page.It returns a list of web elements.
Example: List <WebElement> elementList = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));

14. How to select a value in a drop-down?

A value in the drop-down can be selected using WebDriver’s Select class.
Syntax:

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);

15. What is the difference between driver.close() and driver.quit command?

close(): Close() method closes the web browser window that the user is currently working.

quit(): Quit() method closes down all the windows that the program has opened. 

16. What is the difference between getWindowhandles() and getwindowhandle()?

getwindowhandles(): It is used to get the address of all the open browser and its return type is Set<String>

getwindowhandle(): It is used to get the address of the current browser where the control is and return type is a string

17. Explain how you can switch back from a frame?

To switch back from a frame use method defaultContent()
Example: driver.switchTo().defaultContent();

18. What is the difference between driver.get() and driver.navigate()?

driver.get(): It's used to go to the particular website, But it doesn't maintain the browser History and cookies so, we can't use forward and backward button, if we click on that, page will not get schedule

driver.navigate(): it's used to go to the particular website, but it maintains the browser history and cookies. So we can use the forward and backward button to navigate between the pages during the coding of test cases

19. What is Gecko driver?

Gecko Driver is the link between your tests in Selenium and the Firefox browser. Gecko Driver is a proxy for using W3C Web Driver-compatible clients to interact with Gecko-based browsers i.e. Mozilla Firefox in this case. As Selenium 3 will not have any native implementation of FF, we have to direct all the driver commands through Gecko Driver.

20. What are the differences between XPath and CSS?

With XPath, we can search elements either backward or forward in the DOM hierarchy while CSS works only in a forward direction. This means that with XPath we can locate a parent element using a child element.

Sunday, May 15, 2016

Web Service Testing - POSTMAN Tool

Introduction to Web Service:

A Web Service is a service accessed via Network. Web Service is a way to publish our application over the web and enable other applications to access functions defined by our web service.

Below are the HTTP Methods, that we're going to learn in web service testing (You can relate the below methods with DML commands in SQL)
  • GET -------------> Select Query
  • POST -----------> Insert Query
  • PATCH ---------> Update Query
  • PUT -------------> Update Query
  • DELETE -------> Delete Query 
POST(Create) - With the help of POST method, we can easily push the records into the table. The success response code is 201 Created.

GET(Read) - With the help of GET method, we can easily read the records from the table. The success response code is 200 OK.

PUT(Update) - With the help of PUT method, we can easily update the records in the table. For updating a value, we have to pass the parameters in the request URL. The success response code is 200 OK / 204 No Content.

PATCH(Partial Update) - With the help of PATCH method, we can easily update the single value in the table. For updating a value, we have to pass the parameters in the request URL. The success response code is 200 OK / 204 No Content.

DELETE (Delete) - With the help of DELETE method, we can easily delete the records from the table. The success response code is 200 OK.

All the above-mentioned HTTP methods are using REST protocol.

Learn about REST Protocol:
REST means REpresentational State Transfer protocol. It is an architecture that generally runs over HTTP.

The advantage of using Restful APIs:

Rest API supports both XML and JSON format. It is usually preferred for mobile and web apps as it makes app work faster and smoother.

Sample XML format for POST request:

<InsertCustomer>
<Name>Balaji</Name>
<TelephoneNumber>9999999999</TelephoneNumber>
</InsertCustomer>

Sample JSON format for POST request:
{
    "InsertCustomer": 
     {
        "Name": "Balaji",
        "TelephoneNumber": "9999999999"
     }
}

Learn about POSTMAN:

Postman is a Chrome App. This means that Postman can only run on the Chrome browser.
Postman is a powerful API testing tool. By using this tool, we can easily test our API’s. With postman, we can construct request quickly, save them as collections for later use. Please refer the figure 1.0.

Figure 1.0 - POSTMAN

How to add POSTMAN to chrome browser
1.Launch the Chrome browser.
2.Type the "Postman Chrome" in the address bar field.
3.Click the first search result.
4.In the postman home page, click the "Add to Chrome" button.

Learn about Collection:

A collection allows you to group individual requests together. These requests can be further organized into folders to accurately mirror your API. Please refer the figure 1.1, 1.2 & 1.3.

The collection runner runs requests in a collection in the order in which you set them. It also runs tests for every request and gives you an aggregate summary of what happened. It stores all your test runs so you can compare them and see what has changed.

All you have to do is select a collection, an environment if needed, and hit the Start Test button. Optionally, you can also add a CSV or a JSON file from which Postman can pick up data values.Please refer the figure 1.4 & 1.5.
If you want to run your request as a collection, we have to purchase jet-packs. It costs 9.99 dollars. 

Jetpacks are awesome upgrades, which will make our API workflow faster and more efficient.
Once you activate the Jetpacks upgrade, you get the following features:
1. Test editor and runner: Lets you write and run tests within Postman.
2. Collection runner: Lets you run an entire Postman collection in one go.
3. Data variables: Let’s you parameterize requests with values from a JSON/CSV file. This makes testing multiple scenarios as easy as adding another row to a spreadsheet.A one-time initialization is required. All future updates will be free.

Figure 1.1 - Create Collection

Figure 1.2 - Add Folder to the Collection

Figure 1.3 - Added Folders into the Collection

Figure 1.4 - Collection Runner




Figure 1.5 - Test Result

Learn about Environment:

While working with APIs, you will often need to have different setups. Environments give you the ability to customize requests using variables. This way you can easily switch between different setups without changing your requests.Environments can be downloaded and saved as JSON files and uploaded later.
Each environment is a set of key-value pairs. These can be edited using the key-value editor. The key is the variable name.
Variables can be used in the following form - {{variable Name}}. The string {{variable Name}} will be replaced with its corresponding value. For example, for an environment variable 'URL' with the value 'http://localhost’, you will have to use {{url}} in the request URL field. {{url}} will be replaced by http://localhost when the request is sent. Please refer the figure 1.6 & 1.7.

Figure 1.6 - Add Environment

Figure 1.7 - Select Environment



Learn about Newman:
Newman is a command-line collection runner for Postman. It allows you to run and test a Postman collection directly from the command-line.Newman is built on Node.js. To run Newman, make sure you have Node.js & python installed.

By using the below commands, we can easily install the newman & run the postman collection directly from the command-line on our machine.

npm install -g newman
newman -c mycollection.json –n 10 –e environment variable –H report.html 
d data.json
-c Specify a Postman collection as a JSON [file]
-e Specify a Postman environment as a JSON [file]
-n Define the number of iterations to run
-H Export a HTML report to a specified file
-d Specify a data file to use either json or csv