Debomita Bhattacharjee

Debomita Bhattacharjee

590 Articles Published

Articles by Debomita Bhattacharjee

Page 56 of 59

How to set priority to the test cases in TestNG?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 11-Jun-2020 692 Views

We can set priority for test cases in order of their execution, by giving priority to each test method. A test method having lower priority runs first then the test methods with higher priority are executed.Example@Test (priority = 1) public void verifyTravel(){    System.out.println("Travel history successful "); } @Test (priority = 2) public verifyIncome(){    System.out.println ("Income history successful"); }In the Java class file, verifyTravel() will run first followed by verifyIncome().

Read More

How can a particular group of test cases get executed in TestNG?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 11-Jun-2020 1K+ Views

We can run a particular set of test cases by including a group of test cases in the execution.ExampleTestng xml files with groups.                                                                           To run a group of test cases from the set of test cases, we have to define in the testng xml file. Here the testNG xml contains group Smoke to be included in execution.Example@Test(groups={"Smoke"}) public void Payment(){    System.out.println(“Payment is successful”); }In the Java class file only the test method with group as Smoke will be run out of the entire regression suite.

Read More

How to overlook a particular test method from execution in TestNG?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 11-Jun-2020 484 Views

To overlook a particular test method from execution in TestNG enabled helper attribute is used. This attribute has to be set to false to overlook a test method from execution.ExampleJava class file.@Test(enabled=false) public void verifyRepay(){    System.out.println("Repayment successful"); } @Test public void Login(){    System.out.println("Login is successful "); } @Test public verifyHistory(){    System.out.println ("History verification is successful"); }Here the verifyRepay() method shall be overlooked during execution.

Read More

How does the execution of a particular test method depend on other testnmethods in TestNG?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 11-Jun-2020 401 Views

The execution of a particular test method can be made dependent on another test method with the help of dependsOnMethods helper attribute.Example@Test(dependsOnMethods={"Payment"}) public void verifyLoan(){    System.out.println("Loan payment successful"); } @Test public void Payment(){    System.out.println("Payment successful "); } @Test public verifyTransaction(){    System.out.println ("Transaction verification"); }Here in the Java class file, verifyLoan() method will only be executed after the Payment() method is run successfully. But verifyTransaction() method runs independently without having a precondition test method to be executed.

Read More

What is the purpose of the testng.xml file?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 11-Jun-2020 2K+ Views

The testng.xml file has the numerous uses as listed below −Test cases are executed in groups.Test methods can be included or excluded in the execution.The execution of multiple test cases from multiple java class files can be triggered.Comprises names of the folder, class, method.Capable of triggering parallel execution.Test methods belonging to groups can be included or excluded in the execution.ExampleTestNG.xml file                                                         Here as per the xml file, ...

Read More

Explain modular automation framework.

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 11-Jun-2020 3K+ Views

In a modular automation framework, test scripts are developed on the basis of modules or clusters by dividing the entire application into several small and self-sufficient blocks. Thus individual test scripts belonging to a particular module or cluster are created.These scripts belonging to these isolated modules can be integrated and can be driven by a master driver script to perform integration testing among the modules. All these are achieved with the help of common function libraries (containing essential methods and procedures) which are used while developing scripts for the modules.Modular automation framework follows the concept of Abstraction. Here in this ...

Read More

What do you mean by a Framework? Name the types of framework available.

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 11-Jun-2020 603 Views

A framework is a set of rules, guidelines and best practices that are followed to get the desired results. A testing framework should have the features listed below:Should support more than one browser.Should run on multiple platforms.Should run on multiple programming languages like Java, Python, C#, Ruby and so on.Efficient handling of test data.Test case creation and updating are easy and maintainable.Provision for setting priority for each test case execution.Efficient test report generation.Proper test history maintenance for interpreting trends and analysis of execution results.Integration with continuous integration tools like Jenkins.Minimal manual intervention.Increases efficiency and productivity.Ensures efficient test code coverage.The types ...

Read More

List down the differences between Selenium and UTP.

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 11-Jun-2020 213 Views

The differences between Selenium and UTP are listed down below.sl.no.SeleniumUTP1It is open source and can be used free.It is a licensed tool and is commercialized for use.2It supports the majority of browsers like Chrome, Firefox, Internet Explorer, Safari and so on.It supports Chrome, Firefox and Internet Explorer.3It only tests web based applications.It tests both windows and web based applications.4There is no in built object Repository.By default, object repositories are available and maintained.5It can be developed on multiple languages like Java, C#, Javascript, Python and so on.It can be developed only on VB scripts.6There is no external support for vendors for ...

Read More

How to deal with reusable components in Selenium Java?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 11-Jun-2020 1K+ Views

We can deal with reusable components in Selenium Java with the help of inheritance concept. It is a parent child relationship where the child class inherits the properties and methods of the parent class.ExampleFor Parent class.import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.Properties; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class Baseclass {    public void login() throws IOException {       Properties prop = new Properties();       //Reading values from property file       FileInputStream ips = new FileInputStream(       "C:\Users\ghs6kor\eclipse- workspace\Inheritance\config.properties");       prop.load(ips);       System.setProperty("webdriver.gecko.driver",       ...

Read More

How to handle proxy in Selenium in Java?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 11-Jun-2020 2K+ Views

We can handle proxy in Selenium in Java with the help of PROXY class.import java.io.IOException; import org.openqa.selenium.Proxy; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.remote.CapabilityType; import org.openqa.selenium.remote.DesiredCapabilities; public class ProxySelJav { public static void main(String[] args) { // TODO Auto-generated method stub WebDriver driver; String prox = "localhost:8080"; // set browser settings with Desired Capabilities Proxy p = new Proxy(); p.setHttpProxy(prox).setFtpProxy(prox).setSslProxy(prox) .setSocksProxy(prox); ...

Read More
Showing 551–560 of 590 articles
Advertisements