Tuesday, 7 August 2018

SE - 33 - Can we use multiple conditions when we apply Explicit wait

We can apply multiple conditions while implementing explicit wait in webdriver. We can give multiple conditions by using OR\AND with ExpectedConditions class. Example below :


public class MultipleWaits {

 public void mulwwait() {
  WebDriver driver = new ChromeDriver();
  
  WebDriverWait Wait = new WebDriverWait(driver , 10);
  Wait.until(ExpectedConditions.and(          //here AND\OR conditions can be applied here
    ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath("Path1")),
    ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath("Path1")),
    ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath("Path1"))
    )
    );
 }
}
In the above example I have used AND conditions for giving multiple conditions to webdriver explicit wait. We can also use OR in place of it.

SE - 32 - Can we have Constructors inside constructor(or constructor chaining)

Yes we can have multiple constructors a class with different signatures. Also we can call the constructor from the constructor using this keyword :

See the example below :

public class ConstInConst {
// constructor 1
 ConstInConst(){
  this(1,2); //calling constructor 2
 }
//constructor 2
 ConstInConst(int i, int j) {
 this(4,5,6); // calling constructor 3
 System.out.println(i +" and "+ j);
 }
//constructor 3
 ConstInConst(int i, int j, int k) {
 System.out.println(i +" and "+ j + " and " + k);
 }

 public static void main(String[] args) {
  new ConstInConst();
 }
}
Output : 
4 and 5 and 6
1 and 2


In the above example we have created 3 constructors and called the second constructor in first and third in second. This term is also called constructor chaining. We can't call 2 constructors in a single constructor(only one is allowed at a time) . It gives error because the first line should call the constructor. 



Sunday, 5 August 2018

SE - 31 - Difference between .equals() and "==" operator


=> .equals
i) Its a method
ii) It can only be used for object comparison
iii) It does not looks for memory reference rather it looks for the objects(contents)

=> "=="
i) Its an operator (equality operator)
ii) It can be used for primitive as well as object comparison
iii) "==" compare two objects based on their memory reference(or address). It will return true only if two object has same reference or the reference it is comparing represent exactly same object . In the situation where the object reference are different then it will return false.

Example :

public class equalDotEquals {

 @Test
 public void equals() {
  
  Integer I1 = new Integer(10);
  Integer I2 = new Integer(10);
  System.out.println((I1==I2));
  System.out.println((I1.equals(I2)));
  //Now we are making the same reference
  I1=I2;
  System.out.println("-----------------------");
  System.out.println((I1==I2));
  System.out.println((I1.equals(I2)));
 }
}
Output of above program :

false
true
-----------------------
true
true


Here we can see that we created two objects I1 and I2  of Integer. We applied "==" and ".equals()" operator on it. The output of "== " is false but output of ".equals()" is true . The reason is that "==" is using reference for comparison but reference of both the objects are different so its showing false. But equal() method compares the content(object) so its showing true.
Now we made the references of both the variable same by using I1=I2. now both the operators are giving same output.

Wednesday, 1 August 2018

SE - 30 - Setting timer for a page to load completely by JavaScriptExecutor


Apart from waits there is one more synchronisation point through which we can check that the page is loaded or not or we can set a timeout for it. This can be achieved through java script executor.

Below code demonstrates that how we can use Javascriptexecutor to set a timeout and check that the page is loaded :
public void waitForLoad(WebDriver driver) {
    ExpectedCondition<Boolean> pageLoadCondition = new ExpectedCondition<Boolean>() {
                public Boolean apply(WebDriver driver) {
                    return ((JavascriptExecutor)driver)
                      .executeScript("return document.readyState").equals("complete");
                }
            };
    WebDriverWait wait = new WebDriverWait(driver, 30);
    wait.until(pageLoadCondition);

So here we can see that we are checking the document.readystate should be equal to true. We have kept this inside the expected condition and we are using this with webdriver explicitwait.

Tuesday, 31 July 2018

SE - 29 - WebDriver Timeouts

We have already heard about thread.sleep and other explicit waits but there are few waits which are provided by WebDrivers too :

1) implicitlyWait : Specifies the amount of time the driver should wait when searching for an element if it is not immediately present. It works on DOM level. When searching for a single element, the driver should poll the page until the element has been found, or this timeout expires before throwing a NoSuchElementException. When searching for multiple elements, the driver should poll the page until at least one element has been found or this timeout has expired.
Increasing the implicit wait timeout should be used judiciously as it will have an adverse effect on test run time, especially when used with slower location strategies like XPath.

2) setScriptTimeout : Sets the amount of time to wait for a page load to complete before throwing an error. Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error. If the timeout is negative, then the script will be allowed to run indefinitely.

3) pageLoadTimeout : Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error. Sets the amount of time to wait for a page load to complete before throwing an error. If the timeout is negative, page loads can be indefinite.


WebDriver driver = new ChromeDriver();
driver.manage().timeouts().pageLoadTimeout(40, TimeUnit.SECONDS);
driver.manage().timeouts().setScriptTimeout(40, TimeUnit.SECONDS);
driver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);



Sunday, 29 July 2018

SE - 28 - TestNG Parameterization through @Parameters Annotation

There are few important points to keep in mind for Parameterization through @Parameter annotation in TestNG:

Consider the following example :
Program :
package Package1;

import org.testng.annotations.Optional;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

public class Pack1class1 {

 @Test
 @Parameters({"Parameter1","Parameter2"})
 public void P1c1M1(String Parameter1 ,String Parameter2) {
  System.out.println("Package1_class1_Method1");
  System.out.println(Parameter1);
  System.out.println(Parameter2);
 }
 
}
testng.xml :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
 <parameter name="Parameter1" value="TestParm1"></parameter>
  <parameter name="Parameter2" value="TestParm2"></parameter>

  <test thread-count="5" name="Test">
      <classes>
      <class name="Package1.Pack1class1"/>
     </classes>
  </test> <!-- Test -->
</suite> <!-- Suite -->
-> We can give only one parameter value for one type of parameter. If we want to have multiple values then we can use data-providers. In the above example we have defined 2 parameters Parameter1 and Parameter2 with single value. The purpose of these parameters are just to give the value from testng.xml.


-> If we try to give more values by giving comma then script will consider it as one single string:
 <parameter name="Parameter1" value="TestParm1"></parameter>
  <parameter name="Parameter2" value="TestParm2 , TestParam3"></parameter>
In this example we have tried to give two values in parameters , but TestNg will consider it as a single parameter and output will be TestParm2 , TestParam3
There is no way to give 2 parameter values.


-> Now in another try if we  give different values by creating new line in testng.xml fil as below :
 <parameter name="Parameter1" value="TestParm1"></parameter>
  <parameter name="Parameter2" value="TestParm1"></parameter>
  <parameter name="Parameter2" value="TestParm3"></parameter>
Here we can see that we are trying to give 2 different values to Parameter2 but while execution only the last value will be considered and output will be TestParm3


-> Through testng.xml file the parameters can only be given at Suite and test level.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
 <parameter name="Parameter1" value="TestParm1"></parameter>
  <parameter name="Parameter2" value="TestParm1"></parameter>
  
  <test thread-count="5" name="Test">
    <parameter name="Parameter3" value="TestParm1"></parameter>
      <classes>
      <class name="Package1.Pack1class1"/>
     </classes>
  </test> <!-- Test -->
</suite> <!-- Suite -->


->In case if the parameter name is same in suite level and test level then test level parameter will get preference over suite level. So, in that case, all the classes inside that test level will share the overridden parameter, and other classes which are outside the test level will share suite level parameter.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
 <parameter name="Parameter1" value="TestParm1"></parameter>
  <parameter name="Parameter2" value="TestParm1"></parameter>
  
  <test thread-count="5" name="Test">
    <parameter name="Parameter2" value="TestParm2"></parameter>
      <classes>
      <class name="Package1.Pack1class1"/>
     </classes>
  </test> <!-- Test -->
</suite> <!-- Suite -->
So here the TesgNG will pick the value of the Parameter2 from the Test level that is TestParm2. The value at suite level will be ignored. The output of the above program will be :

Package1_class1_Method1
TestParm1
TestParm2


-> If the parameter has no value in testng.xml then we can give @Optional annotation and define he default value.
(i) Program with @Optional value but we have Parameters present in Testng.xml
package Package1;
import org.testng.annotations.Optional;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

public class Pack1class1 {
 @Test
 @Parameters({"Parameter1","Parameter2"})
 public void P1c1M1(@Optional ("ABC") String Parameter1 ,@Optional("XYZ")String Parameter2) {
  System.out.println("Package1_class1_Method1");
  System.out.println(Parameter1);
  System.out.println(Parameter2);
 }
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
 <parameter name="Parameter1" value="TestParm1"></parameter>
  <parameter name="Parameter2" value="TestParm1"></parameter>
    <test thread-count="5" name="Test">
      <classes>
      <class name="Package1.Pack1class1"/>
     </classes>
  </test> <!-- Test -->
</suite> <!-- Suite -->
Since we have valid values in testng.xml for the given parameters so output of above program will be :
Package1_class1_Method1
TestParm1
TestParm1

(ii) Program with @Optional value but we don't have Parameters present in Testng.xml
package Package1;
import org.testng.annotations.Optional;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

public class Pack1class1 {
 @Test
 @Parameters({"Parameter1","Parameter2"})
 public void P1c1M1(@Optional ("ABC") String Parameter1 ,@Optional("XYZ")String Parameter2) {
  System.out.println("Package1_class1_Method1");
  System.out.println(Parameter1);
  System.out.println(Parameter2);
 }
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
 <parameter name="Parameter1" value="TestParm1"></parameter>
    <test thread-count="5" name="Test">
      <classes>
      <class name="Package1.Pack1class1"/>
     </classes>
  </test> <!-- Test -->
</suite> <!-- Suite -->
Here we can see that there is just one parameter in testng.xml but we are passing 2 parameters in our program. In this case the optional value will be called for second parameter, Output will be :

Package1_class1_Method1
TestParm1
XYZ

-> Now there can be a situation when the parameter type in xml is string and in method we have given int.  It means there is type mismatch in the parameter type. In this case we get the following exception:

[Utils] [ERROR] [Error] java.lang.NumberFormatException: For input string: &quot;ABC&quot;

Monday, 23 July 2018

SE - 27 - Comparator and Comparable


Comparable :
i) Interface that needs to be implemented:  java.lang.Comparable
ii) A comparable object compares its own instance with other class object instance
iii) It has only one method , Syntax : int obj1.compareTo(obj2)
iv) Returns : Negative , if obj1< obj2
                     Zero ,  if obj1 = obj2
                     Positive ,  if obj1 > obj2
v) Default natural sorting order
vi) All wrapper and string classes implements comparable


Comparator:
i) Interface that needs to be implemented:  java.util.Comparator
ii) An object of comparator compares objects of two different class instances
iii) It contains 2 methods :
      Syntax : int compare(obj1, obj2) , Int equals(obj1 , obj2)
iv) Returns : Negative , if obj1< obj2
                     Zero ,  if obj1 = obj2
                     Positive ,  if obj1 > obj2
v) Customised sorting order
vi) Collator and ruleBased collator implements comparator.

Saturday, 21 July 2018

SE - 26 - Static Block

Static Block is used for static initialisation of class.

i) The code written in static block runs only once whenever a object of class is created for the first time .

ii) The code written in static class can even execute when we call a static variable of that class but it will be called only once.

iii) There can be multiple static blocks in a class. They will run in the sequence its defined. All of them will run only once in either of above two conditions.

class Test{
   static int num;
   static{
      System.out.println("Static Block  : 1");
  } 

  static{
      System.out.println("Static Block :  2");
  }


iv) If there are multiple static block with the different value of the static variable then the value will be overrided and the last value will be set. (Since the static members are shared across the project)

v) If we miss to write the word static while defining static block then the piece of code will be considered as constructor block and will be called.

vi) Super , this keywords are not supported in static block and checked exceptions are also not allowed



SE - 25 - Benefits of BDD(Cucumber)

Here are few aspects and benefits of using cucumber:

i) In BDD the end-to-end business scenarios(user stories) are automated

ii) Behaviour of application is focused rather than unit-testcases

iii) It combines business language with testing

iv)  Cucumber has 3-step separation of feature . step and world. It means code reusability with a great extent is supported. Let's see how :

When we write a feature file we write the gherkin scenario as :

Given :
When
Then :

When writing multiple scenarios in a feature few of the steps may be same. If  "Given" condition is same in multiple features we can use the same definition for multiple scenarios.

There is one more advantage, if any code is wrong we just need to modify that particular step only. If "Given" or "Then" or "When" is wrong we just need to modify that step only. 

Friday, 20 July 2018

SE - 24 - Default constructor in Java

Default constructor is automatically generated in JAVA when there are no constructors present or defined by user. Few important things about default constructor :

i) It is only created automatically by java if there are no defined constructors in the class

ii) It has no arguments or body

iii) It initialises the member data value with the default values. It initializes only the uninitilized variables. : Eg :

class DefaultConstTest {
   int i;
   DefaultConstTest t;
   boolean b;
   byte bt;
   float ft;
}
Since there are no constructors here so java will automatically run the default constructor and assign default value to its members :

Here the Value assigned will  be:

0
null
false
0
0.0

iv) If we say how the default constructor looks like , then simply it's a constructor with no arguments and body. It will look like :

DefaultConstTest() {}

v) If we create our own constructor then java will not create any default constructor

vi) The no-arg constructor and default constructor are not same. The no-arg constructor is defined by user while default constructor is created by JAVA

Wednesday, 18 July 2018

SE - 23 - Nested class in Java

Java supports two type of nesting :

1) Static nested class
2) inner nested class

Lets take a code example :

Here we have created a inner nested class and static nested class
public class mainclass {
 //inner nested class
 public class subclass{
  //method inside inner nested class
  public void method1() {
    
    System.out.println("inner nested class");
   }
  }
 //static nested class
 public static class substaticclass{
  //method inside static nested class
  public void method2() {
   
   System.out.println("nested static class");
  }
 } 
}

In the below code we are calling the methods created in the inner nested class and static nested class in above code :
public class classCall {

 @Test
 public void callm() {
  //calling a inner class
  mainclass x = new mainclass();
  mainclass.subclass z = x.new subclass();
  z.method1();
  
  //calling a static class
  mainclass.substaticclass c = new mainclass.substaticclass();
  c.method2();
 }
}

Output:
inner nested class
nested static class

So here we can see clearly that the members of static classes can be called directly by class name. For the inner class object we need to create reference of the outer class then call the members of the inner class.


SE - 22 - Shadowing in Java

Shadowing is a common concept in java. It may refer to classes or variables. The concept of shadowing comes when a variable of same name overlaps within different scopes. For example :

public class A{

int z = 10;
system.out.println(z);

public void M()
{
int z = 20;
system.out.println(z);
}
}

Output :
10
20

In the above example we saw clearly that the variable z is same in class and method level but its scope are different. When we try to print the variable from the method , the value 20 is printed . So here the variable of higher- scope level is hidden and variable of lower scope overrides it. This is called shadowing.

Similarly this concept is used as class level too. When we use nested class then the variable in the parent class is suppressed by the variable of the nested inner class.  For Example :

public class A{

int z = 10;
system.out.println(z);

public class B{
int z = 20;
system.out.println(z);

public void M()
{
int z = 30;
system.out.println(z);
}
}
}

Again the variable z is same in 2 different classes and 1 method but its scope is limited. When we call a lower lever variable it suppresses the higher ones.

Sunday, 15 July 2018

SE - 21 - Static Methods - OverLoad and OverRide

This is one of the confusing concept that whether we can overload or override static methods. so lets discuss at solution.

-> Can Static methods be overloaded?
The answer to this question is "YES. The static methods can be simply overloaded like other methods. For static method overloading we just need to keep the name same and signature/parameter different.

Eg: In the below example static method ABC is overloaded
public class Testing {
    public static void ABC() {
        System.out.println("Method ");
    }
    public static void ABC(int a) { 
        System.out.println("OverLoaded Method with argument" + a);
    }
    public static void main(String args[])
    { 
        Test.ABC();
        Test.ABC(10);
    }
}

-> Can we override Static methods ?
The answer to this question is "NO". It can not be overridden. If we make a method with same name in new class then it is considered as new method by java. Compiler will not give any error when we make a method in extended class with the same name as the parent class. Few more points to be considered :

Here a base class is created with overloaded methods named "a"
public class  Base{
 public static void a(int a) {
  System.out.println("static method 1");
 }
 
 public static void a() {
  System.out.println("static method 2");
 }
}

Here we extend the base class mentioned above and made a method with the same name as "a"
public class Overr extends Base{

public static void a() {
 System.out.println("Static Method 3");
}

@Test
public void b() {
 
 Base.a();
 Overr.a();
 
Base a1 = new Base();
a1.a();

Overr a2 = new Overr();
a2.a();

Base a3 = new Overr();
a1.a();

 }
}

Now we called the method in 5 different ways and found the output below as:
Output:
static method 2
Static Method 3
static method 2
Static Method 3
static method 2

Lets discuss each approaches:

1) Since static methods can be called directly by class name , so if we call the static method of base class by class name then only the method present in base will execute

 Base.a();//output static method 2

2) In this case we called the method of the extended/overridden class by class name. Now the static method present in overridden class will called.

 Overr.a();// output Static Method 3
3) This is similar to 1. We can also call the static method by making object of class. So if we create object of base class then only the method present in base will execute 

Base a1 = new Base();
a1.a(); //output static method 2

4) This is similar to 2. We have created object of extended class "Overr" and called the method "a". Here static method present in overridden class will be called.

Overr a2 = new Overr();
a2.a();  // output Static Method 3

5) In this approach we have created the object of child class by giving reference of  base class. As per overriding rule the method which is overridden should be called, but static methods doesn't supports overriding so only base method will be called. This is the most important concept of static class.

Base a3 = new Overr();
a1.a();//output static method 2
Hence from this logic we can say that static method cant be overridden . If we try to override it a new method is created.


SE - 20 - Some tricks about Interface

Interface is one of the general concepts of Java but there are some tricky questions based on it:

1) One interface class can be extended by another interface class. It is a wrong perception of lot of people that interface can only be implemented.

2) When an interface I1  is extended by another interface I2 and I2 is implemented in class C1 , then all the methods of interface I1 and I2 has to be implemented in class C1. This is best used in the scenario when there are two methods of same name and different signature in I1 and I2 because JAVA doesn't allows a class directly to implement two interfaces having same method name and different signature type.

3) When an interface I1  is extended by another interface I2 and we try to implement I1 in class C1 , then all the methods of interface I1  has to be implemented in class C1. No need to implement methods of I2 interface.

4) As of now we were knowing that Interface does not have defined methods and it contains only declared methods. In Java 8 we have option to give method body in an Interface. It can be done in two ways :
-> a) By defining the method as Default - It can be called by implementing in child object and creating object of child class
-> b) By defining the method as Static - It can be called directly by class name.

5) If we want to implement only few of the methods of an interface and leave the remaining ones then we have to create an abstract class for implementing the partial methods of interface.

6) Multiple inheritance is not supported by java directly but it can be done by interfaces.

7) All the variables in interface are static constants

8) All the methods in interface are abstract and public

9) Java doesn't allows a class to implement two interfaces that have methods of same name but different signature

10) The interface variable has to be initialized otherwise compiler will throw an error.

11) We can't create object of interface class

SE - 19 - Difference between ScrollTo and ScrollBy in JavaScript

Both the methods are almost same with a slight difference in functionality . Let's see the syntax of both the scroll commands :

1) Window.scrollTo(x-Pixel, y-pixel);

2) Window.scrollBy(x-Pixel, y-pixel);

Difference :The scrollTo is for absolute scrolling and scrollBy is for relative scrolling. In a nutshell we can say that scrollTo will scroll to the (x-Pixel, y-pixel) position of the entire webpage while ScrollBy will move to the (x-Pixel, y-pixel) of the webpage from the current location of cursor.

Eg: Suppose we are at position (100,100) of the webpage , now

Case 1 : If we use Window.scrollTo(200,200) - The window will scroll to position 200,200 of the webpage in spite of the current position of (100,100). At the end of the execution of this command our position will be (200,200)

Case 2 :  If we use Window.scrollBo(200,200) - The window will scroll relatively from the current location to further 200,200 pixels.. At the end of the execution of this command our position will be (300,300) since we started at (100,100).

SE - 18 - Different Scroll and other Commands used in selenium using JavaScriptor

Selenium webdriver works on DOM so it not always needs scroll bar to locate the objects, but there are certain instances where the object becomes visible only after scrolling. In these situations we need to scroll through the webpage to perform any action on the objects.

There could be 2 types of scrolling : Horizontal and Vertical

To achieve the horizontal and vertical scrolling we use javascriptexecutor in Selenium. The scrolling is done based on pixels which is given as parameter..

The syntax is as below :
JavascriptExecutor js = (JavascriptExecutor) driver;  
   js.executeScript(Script,Arguments);
There are different situations in which we need different types of scrolling . They are : 

1) To scroll to a particular position by giving the exact pixels in the parameters :
JavascriptExecutor js = (JavascriptExecutor) driver;  
   js.executeScript(Window.ScrollBy(400,500)");
The above command will scroll the window to 400 Horizontal(x-pixels) and 500 vertical(y-pixels) pixels.

Note: If we want to scroll only horizontally or vertically then we can give that location only and keep the other one as zero. we can give the argument as :

Window.scrollBy(0,500) - to scroll 500 pixel vertically

2) To scroll on a webpage  till a element becomes visible and can be located
        //Give the locator of the  "Element" present on the webpage           WebElement Element = driver.findElement(By.name("ABCD"));

        //Now scroll on the window till the element is found  
        js.executeScript("arguments[0].scrollIntoView();", Element);
Here we locate the element which has to be found on webpage by a unique locator. Then we use the given argument in the javascriptexecutor. It will keep on scrolling till the element is found.

Note : This can be done horizontally or vertically till the element is found

3) To scroll till the end of the page
JavascriptExecutor js = (JavascriptExecutor) driver;  
   js.executeScript(Window.ScrollTo(0,document.body.scrollheight)");
This command will keep on scrolling till the end of the webpage

4) To scroll Up,Down , Left and Right from current Location : 

Left
JavascriptExecutor js = (JavascriptExecutor) driver;  
   js.executeScript(Window.ScrollBy(-2000,0)");

Right


JavascriptExecutor js = (JavascriptExecutor) driver;  
   js.executeScript(Window.ScrollBy(2000,0)");

Up


JavascriptExecutor js = (JavascriptExecutor) driver;  
   js.executeScript(Window.ScrollBy(0,2000)");
Down


JavascriptExecutor js = (JavascriptExecutor) driver;  
   js.executeScript(Window.ScrollBy(0,-2000)");


    Saturday, 14 July 2018

    SE - 17 - Run BDD(cucumber) tests in Parallel

    We will discuss the approaches to run Cucumber test cases in parallel in BDD framework. The first approach is pretty simple where we can create a separate runner class for each feature file. This approach is not so good as we will have to create too many runner classes. There will be hundreds of runner classes which will be hard to maintain.

    Now the second approach is better as compared to the first one. We need 2 plugins for parallel execution through cucumber. They are :
    (i) Cucumber JVM Parallel Plugin
    (ii) maven-failsafe-plugin

    The maven-failsafe-plugin is used to configure the parallel execution. We can configure the threadcount and parallel classes. T
    he Cucumber JVM Parallel Plugin is used to generate the runners. We need to set parallelScheme and the customVmTemplate in it. The parallelScheme must be Feature because we run feature files in parallel. There are few more configurations which needs to be done here. We need to set the Glue package where step definitions are located.