Testing

When will you automate a test?

Automation in preferred in following cases:

  • Repetitive Tasks
  • Smoke and Sanity Tests
  • Test with multiple data set
  • Regression test cases

What are the things can you automate in applications?

The following things can be automated in an application:

  • Regression test suite
  • Smoke / Sanity test suite
  • Build deployment
  • Test data creation
  • Automating behind the GUI like testing of APIs and methods.

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

In Selenium the driver.close() closes the current browser and the driver.quit() closes all browsers.

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

  • Functional Testing
  • Regression Testing

How do you run headless mode browsers in Protractor?

Headless browser doesn’t require a graphics driver at all, They just get commands and execute them directly in memory. To achieve this, you need to specify headless in cong.js under capabilities.

For Chrome browser:

capabilities: {
  browserName: 'chrome',

  chromeOptions: {
	 args: [ "--headless", "--disable-gpu", "--window-size=800,600" ]
   }
}

For Firefox browser:

capabilities: {
  browserName: 'firefox',

  'moz:firefoxOptions': {
	 args: [ "--headless" ]
   }
}

How do you handle a Textarea element?

The text area does not have much difference from the text bar so that we can handle it like a normal textbox/text bar element.

How to check Internet connection using Selenium webdriver?

You can use the below code snippet to check whether internet is connected or not:

WebDriver driver = new ChromeDriver();

driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
driver.navigate().to("https://www.google.com");

WebElement error = driver.findElement(By.className("error-code"));

if(error.getText().equals("DNS_PROBE_FINISHED_NO_INTERNET") || error.getText().equals("ERR_NAME_NOT_RESOLVED")) {
	System.out.println("No Internet Connection"); 
} else { 
	System.out.println("Internet Connected"); 
}

driver.close();

Using Selenium how can you handle network latency?

To handle network latency you can use driver.manage.pageloadingtime for network latency.

How to decide the tool that one should use for Automation testing in their projects?

In order to identify the tool for Automation testing in your project:

a) Understand your project requirements thoroughly and identify the testing scenarios that you want to automate.

b) Search for the list of tools that support your project’s requirements.

c) Identify your budget for the automation tool. Select the tools within your budget.

d) Identify if you already have skilled resources for the tools. If you don’t have the necessary skilled resources then identify the cost for training the existing resources or hiring new resources.

e) Now compare each tool for key criteria like:

  • How easy is it to develop and maintain the scripts for the tool.
  • Can a non-technical person also execute the test cases with little training?
  • Does the tool support different types of platforms like web, mobile, desktop etc based on your project requirements?
  • Does the tool have a test reporting functionality? If not, is it easily configurable for the tool?
  • How is the tool for cross-browser support for web-based applications?
  • How many different testing types can this tool support?
  • How many languages does the tool support?

f) Once you have compared the tools, select the tool which is within your budget and supports your project requirements, and gives you more advantages based on the key criteria mentioned above.

Explain some Automation testing tools

Some of the famous Automation testing tools are explained below:

(i) Selenium: Selenium is a test framework for web application automation testing. It supports multiple browsers and is OS independent. Selenium also supports various programming languages like java, c#, PHP, Ruby, and Perl etc.

Selenium is an open source set of libraries which can be used to develop additional test frameworks or test scripts for testing web-based applications.

(ii) UFT: Unified functional testing is a licensed tool for functional testing. It provides a wide range of features like APIs, web services etc and also supports multiple platforms like desktops, web, and mobile. UFT scripts are written in visual basic scripting language.

(iii) Appium: Appium is an open source mobile application testing tool. It is used to automate testing on cross-platform, native, hybrid and web-based mobile applications. Appium automates any mobile application from any language with full access to APIs and DBs from the test code.

Appium is based on client-server architecture and has evolved from selenium.

(iv) Cucumber: Cucumber is an open source behavior-driven development tool. It is used for web-based application automation testing and supports languages like ruby, java, scala, groovy etc. Cucumber reads executable specification written in plain text and tests the application under test for those specifications.

For cucumber to understand the scenarios in plain text, we have to follow some basic syntax rules which are known as Gherkin.

(v) TestComplete: TestComplete is a licensed automated UI testing tool to test the application across different platforms like desktops, web, mobile etc. It provides flexibility to record a test case on one browser and run it on multiple browsers and thus supports cross browsers testing.

TestComplete has inbuilt object recognition algorithm which uniquely identifies an object and stores it in the repository.

Is Automation testing in agile Methodology useful or not?

Automation testing is useful for regression, smoke or sanity testing. All these types of testing in traditional waterfall model happen at the end of the cycle and sometimes if there are not many enhancements to the application, we might not even have to do regression testing.

Whereas, in agile methodology, every iteration requires executing the regression test case as a new functionality is added.

Also, the regression suite itself keeps growing after each sprint as the functional test cases of the current sprint module need to be added to the regression suite for the next sprint.

Thus, Automation testing in agile methodology is very useful and helps in achieving maximum test coverage in a lesser time of the sprint.

What are the bugs you have found out while performing mobile application testing during your past experience?

Critical: Your phone system crash when testing particular feature in your device
Block: Unable to do anything though phone is on unless you reboot your device
Major: Unable to perform a function of a particular feature
Minor: Under minor bugs usually GUI bugs fall.

What is a Software Testing Life Cycle (STLC)?

STLC means a software testing process divided into specific phases which are executed sequentially with the aimed of improving the quality of system under test.

What are the phases of STLC?

The phases can differ slightly, depending on the software development model used, system architecture and the nature of the project. Most commonly, the following phases of STLC are the most commonly recognized:

  • Requirements Analysis
  • Test Planning
  • Test Design
  • Test Environment Setup
  • Test Execution
  • Test Closure

What is Software Quality Assurance (SQA)?

Software quality assurance is an umbrella term, consisting of various planned process and activities to monitor and control the standard of whole software development process so as to ensure quality attribute in the final software product.

What is the difference between the Test Plan and Test Strategy?

Test Strategy is at a higher level, mostly created by the Project Manager which demonstrates the overall approach of the testing for the entire project, whereas Test plan basically depicts the how the testing should be performed for a particular application, falling under a project.

QA Life Cycle

It is a integrated system of methodology activity involving like planning, implementation, assessment, reporting and quality improvement to ensure that the process is of the type and quality needed and expected by the client/customer.

  1. Test requirements,
  2. Test planning,
  3. Test design,
  4. Test execution and Defect logging,
  5. Test reports and acceptance,
  6. Sign off.