As a part of TestNG Tutorials, in this post we will see a new feature provided by TestNG called Dry run of test methods. You may heard of the term "Dry Run" in Cucumber. If you want to check that every step in a feature file has its corresponding step definitions, we can run feature … Continue reading TestNG Tutorials 65 : Dry Run Feature in TestNG
REST Assured Tutorial 8 – BDD Style in Rest Assured
As a part of End to End REST Assured Tutorial , in this post We will learn about "BDD Style in REST Assured". BDD is an agile software development process (Not a Software Testing process) which defines expectation from an application to behave from intended user prospective. Each scenario is written in form of Given … Continue reading REST Assured Tutorial 8 – BDD Style in Rest Assured
Interview Experience at UST Global Bangalore for Automation Testing Profile – Nov – 2019
Company Name :- UST GlobalDate :- Nov – 2019Experience Level: – 2 – 5 YearsLocation- BengaluruMode : – F2F 1. What is the main difference between xpath and css selector?2. If there 4 frames in the application . How will you get the 4rth frame ID.3. If there is a ok button. How many ways … Continue reading Interview Experience at UST Global Bangalore for Automation Testing Profile – Nov – 2019
REST Assured Tutorial 7 – Builder Pattern in REST Assured
As a part of End to End REST Assured Tutorial , in this post We will learn about "Builder pattern in Java and how REST Assured uses it". If you refer any tutorial or official website of Rest Assured, they start with an examples as below:-
1
2
3
4
5
6
7
8
9
10
11
|
@Test public void
lotto_resource_returns_200_with_expected_id_and_winners() {
when().
get("/lotto/{id}", 5).
then().
statusCode(200).
body("lotto.lottoId", equalTo(5),
"lotto.winners.winnerId", hasItems(23, 54));
}
|
Beginners may confuse easily with syntax. THe purpose of … Continue reading REST Assured Tutorial 7 – Builder Pattern in REST Assured
Usage of Java Stream API in Selenium – Retrieving Unique Text From a List Of WebElements
In previous post, we learnt to Retrieve text from a list of web elements using Java Stream APIs. You may require just to retrieve unique text only. We used a List in previous post which allows duplicates. We can just use a Set to avoid duplicates. Java Code:-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
package RealtimeValdationAutomationTesting;
import java.util.HashSet;
import java.util.Set;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.Test;
import io.github.bonigarcia.wdm.WebDriverManager;
public class RetrieveUniqueTextFromListOfElementUsingStreamAPICollect {
@Test
public void RetrieveTextFromListOfElementWithStremAPI()
{
// Auto setup of chrome executable file
WebDriverManager.chromedriver().setup();
// Launching browser
WebDriver driver = new ChromeDriver();
// Load the URL
driver.get("http://automationpractice.com/index.php");
// Creating a Set to store only unique names
Set<String> uniqueProductName = new HashSet<String>();
// Locating all product names at home page
driver.findElements(By.xpath("//ul[contains(@class,'active')]//a[@class='product-name']"))
.stream()
.forEach(product -> uniqueProductName.add(product.getText()));
// Print count of product found
System.out.println("Total unique product found : "+uniqueProductName.size());
// Printing product names
System.out.println("All product names are : ");
uniqueProductName.forEach(name -> System.out.println(name));
// closing the browser
driver.quit();
}
}
|
Output:-
1
2
3
4
5
6
7
|
Total unique product found : 5
All product names are :
Printed Dress
Blouse
Printed Chiffon Dress
Faded Short Sleeve T-shirts
Printed Summer Dress
|
You must be thinking … Continue reading Usage of Java Stream API in Selenium – Retrieving Unique Text From a List Of WebElements
Usage of Java Stream API in Selenium – Retrieving Text From a List Of WebElements
Stream API is the major feature introduced in Java 8. As an automation tester, if you think you don't have to learn about it, you may be wrong. Yes you don't need to know everything but little basic knowledge of Stream API will help you to reduce lines of code in Selenium script. I am … Continue reading Usage of Java Stream API in Selenium – Retrieving Text From a List Of WebElements
Interview Experience at HCL Bangalore for Manual & Automation Testing Profile – Aug-2019
Company Name :- HCLDate :- Aug – 2019Experience Level: – 2 - 4 YearsLocation- BengaluruRounds :- 2Mode : – F2F There were many candidates , so I got my chance after 90 mins. There were total 2 rounds. Both were technical and most of the questions were basics from Manual testing, Java , Selenium and … Continue reading Interview Experience at HCL Bangalore for Manual & Automation Testing Profile – Aug-2019
REST Assured Tutorial 6 – Interface in OOPS – Implement As You Wish
As a part of End to End REST Assured Tutorial , in this post We will learn about Interface in Java. I will strongly recommended you to go through the topic Abstraction - Hide the implementation before continuing this post. Let's start with a real time example. You would be reading this post on a … Continue reading REST Assured Tutorial 6 – Interface in OOPS – Implement As You Wish
REST Assured Tutorial 5 – Abstraction – Hide The Implementation
As a part of End to End REST Assured Tutorial , in this post We will learn about Abstraction in Java. If you are thinking why this topic is necessary , do not worry. I will connect all dots in upcoming posts. Abstraction is one of the pillar in Object Oriented Programming. Java is an … Continue reading REST Assured Tutorial 5 – Abstraction – Hide The Implementation
Postman Tutorial Part 48 – All Types of Variables in Postman
We have already learnt about all types of variables in Postman in Postman Series on my blog. This post will bring all concepts of variables together so that you can learn or revise your concepts at one place. A variable is a named memory space which is used to store and manipulate values. You can … Continue reading Postman Tutorial Part 48 – All Types of Variables in Postman