SlideShare a Scribd company logo
JDI – NOT ONLY UI
22 OCTOBER 2017
Chief QA Automation
In Testing more than 12 years
In Testing Automation 10 years
ROMAN IOVLEV
roman.Iovlev
roman_iovlev@epam.com
3
?
• UI Test Framework
• UI Elements oriented
• Dozens of UI elements already implemented
• Most of common problems already solved (e.g.
stabilization)
4
JDI
• UI Test Framework
• UI Elements oriented
5
JDI
• UI Test Framework
• UI Elements oriented
• Interfaces above engines
6
JDI
JDI HTTP
7
@ServiceDomain("http://httpbin.org/")
public class UserService {
@GET("/get") static RestMethod getUser;
@POST("/post") RestMethod updateSettings;
@PUT("/put") RestMethod addUser;
@PATCH("/patch") RestMethod patch;
@DELETE("/delete") RestMethod removeUser;
8
JDI HTTP
@ServiceDomain("http://httpbin.org/")
public class UserService {
@GET("/get") static M getUser;
@POST("/post") M updateSettings;
@PUT("/put") M addUser;
@PATCH("/patch") M patch;
@DELETE("/delete") M removeUser;
9
JDI HTTP
UserService.addUser.call();
RestResponse resp = getUser.call();
assertEquals(resp.status, 200);
assertEquals(resp.statusType, OK);
assertEquals(resp.body(“name"), “Roman");
resp.assertThat(). body("url",
equalTo("http://httpbin.org/get"))
resp.assertThat().header("Connection", "keep-alive");
10
JDI HTTP
app.addUser.send(user);
User actualUser = app.getUser.asData(User.class);
assertEquals(actualUser, user);
11
JDI HTTP
Entities
@ServiceDomain ("http://httpbin.org/")
public class UserService {
@GET ("/get") RestMethod<User> getUser;
@PUT ("/put") RestMethod<User> addUser;
@ServiceDomain("http://httpbin.org/")
public class UserService {
@ContentType(JSON)
@Headers({
@Header(name = "Name", value = "Roman"),
@Header(name = "Id", value = "Test")
}) @GET("/get") M getUser;
12
JDI HTTP
JDI LIGHT SABER
13
BiConsumer<T,U>, BiFunction<T,U,R>,
BinaryOperator<T>, BiPredicate<T,U>,
Consumer<T>, Function<T,R>, Predicate<T>,
Supplier<T>, UnaryOperator<T>…
14
LIGHT SABER
Lambda: Functional interfaces
for (int i=0;i<10;i++)
click.invoke();
JAVA 8
click = () -> element.click();
JAction, JAction1, JAction2, …, JAction9
JFunc, JFunc1, JFunc2, …, JFunc9
15
LIGHT SABER
Lambda: Functional interfaces
JAction click = () -> element.click();
JAction1<WebDriver> close = driver -> driver.quit();
JFunc3<String[], Integer, Boolean, String> func =
(array, index, flag) -> flag ? array[index] : “none”;
List<Integer> list = asList(1, 3, 2, 6)
16
LIGHT SABER
Stream
List<Integer> even = list.stream()
.filter(i -> i % 2 == 0).collect(Collectors.toList());
List<Integer> even = filter(list, i -> i % 2 == 0);
List<String> nums = map(list, i -> “№”+i);
Boolean hasOdds = any(list, i -> i%2 > 0);
LinqUtils
Integer firstNum = first(list);
17
LIGHT SABER
Integer lastNum = last(list);
listCopy(list, 2, 4);
selectMany(list, i -> asList(i,i*2));
listEquals(asList(1,4,3), asList(3,4,1));
first(list, i -> i > 2);
last(list, I -> i<4);
get(asList(3,4,5,2,3,4,2,1), -3);
LinqUtils
public class User extends DataClass {
public String name;
public String psw;
}
18
LIGHT SABER
DataClass
user.toString() -> User(name=epam;psw=1234)
assertEquals(actualUser, expectedUser);
Map<String,Object> fields=user.asMap();
public class User extends DataClass<User> {
public String name, lastName, nick, description, position;
public Integer id, cardNum, passSeries;
}
19
LIGHT SABER
user.set(u -> u.nick = “Supreme”);
user.set(u->{u.id = 32;u.position=“God”;nick=“Thor”;});
DataClass
print(list);
20
LIGHT SABER
PrintUtils
-> “a,b,c”
print(list, “; ”,”{%s}”); -> “{a}; {b}; {c}”
printFields(user); -> “User(name:epam;psw:admin)”
print(nums,n->”(”+n+”)”); -> “(1)(3)(2)(8)”
public String process(List<String> list) {…}
public String process(String[] array) {…}
public String process(Map<String,Integer> map) {…}
21
LIGHT SABER
Java Collections
Map<String, Integer> map = new HashMap<>();
map.put(“A”,1); map.put(“B”,3); map.put(“C”,100500);
map.put(“D”,-1); map.put(“E”,777); map.put(“F”,2);
public String process(List<String> list) {…}
process(new MapArray());
22
LIGHT SABER
MapArray
MapArray<String, Integer> map
= new MapArray<>(new Object[][]
{{“A”,1},{“B”,3},{“C”,100500},{“D”,-1},{“E”,777},{“F”,2}});
LinqUtils
map.get(3); map.revert();map.get(-2);
PAGE OBJECTS
GEENRATOR
23
new PageObjectsGenerator(rules, urls, output, package)
.generatePageObjects();
24
PAGE OBJECTS GENERATOR LIBRARY
RULES
https://domain.com/
https://domain.com/login
https://domain.com/shop
https://domain.com/about
URLS
{"elements": [{
"type":"Button",
"name": “value",
"css": “input[type=button]"
},
…
]}
OUTPUT
src/main/java
PACKAGE
com.domain
<input type=“button” value=“Next”>
<input type=“button” value=“Previous”>
<button class=“btn”>Submit</button>
25
PAGE OBJECTS GENERATOR LIBRARY
"type":"Button",
"name": “value",
"css": “input[type=button]“
"type":"Button",
"name": “text",
"css": “button.btn"
@Findby(css=“input[type=button][value=Next]”)
public Button next;
@Findby(css=“input[type=button][value=Previous]”)
public Button previous;
@Findby(xpath=“//button[@class=‘btn’
and text()=‘Submit’]”)
public Button submit;
VERIFY LAYOUT
26
@Image(“/src/test/resources/submitbtn.png”)
@FindBy(text = “Submit”)
public Button submit;
27
VERIFY LAYOUT
@Image(“/src/test/resources/submitbtn.png”)
@FindBy(text = “Submit”)
public Button submit;
28
VERIFY LAYOUT
submit.isDisplayed();
submit.assertDisplayed();
@ImagesFolder(“/src/test/resources/imgs”)
public EpamSite extends WebSite;
29
VERIFY LAYOUT
@Image(“submitbtn.png”)
@FindBy(text = “Submit”)
public Button submit;
public class EpamSite extends WebSite {
public static HomePage homePage;
30
VERIFY LAYOUT
public class HomePage extends WebPage
@FindBy(text = “Submit”)
public Button submit;
“src/test/resources/jdi-images/epamsite/
homepage/submit.jpg”
31
VERIFY LAYOUT
homePage.verifyLayout()
homePage.assertLayout() / homePage.checkLayout()
public class EpamSite extends WebSite {
public static HomePage homePage;
public class HomePage extends WebPage
@FindBy(text = “Submit”)
public Button submit;
32
JDI SETUP
README
http://jdi.epam.com/
https://github.com/epam/JDI
https://vk.com/jdi_framework

More Related Content

PPTX
Lambda выражения и Java 8
PDF
Operation Flow @ ChicagoRoboto
PPTX
Anti patterns
PDF
ScalaFlavor4J
PDF
Java 8 - project lambda
PDF
Collectors in the Wild
PDF
Sailing with Java 8 Streams
PPTX
Introduction to java 8 stream api
Lambda выражения и Java 8
Operation Flow @ ChicagoRoboto
Anti patterns
ScalaFlavor4J
Java 8 - project lambda
Collectors in the Wild
Sailing with Java 8 Streams
Introduction to java 8 stream api

What's hot (20)

PDF
Advanced Debugging Using Java Bytecodes
PPT
Networking Core Concept
PDF
Java Concurrency by Example
PDF
Finding Clojure
PPT
Come on, PHP 5.4!
PDF
Evolving with Java - How to Remain Effective
PPT
JDBC Core Concept
PPT
Collection Core Concept
PDF
GeeCON 2017 - TestContainers. Integration testing without the hassle
PDF
JEEConf 2017 - Having fun with Javassist
PDF
Eclipse Collections, Java Streams & Vavr - What's in them for Functional Pro...
PDF
PostgreSQL and PL/Java
PDF
ReactiveCocoa workshop
PDF
Java 8 Stream API and RxJava Comparison
PDF
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
PPTX
apache tajo 연동 개발 후기
PDF
The Ring programming language version 1.5.2 book - Part 25 of 181
PDF
Практическое применения Akka Streams
PDF
«Практическое применение Akka Streams» — Алексей Романчук, 2ГИС
PPTX
모던자바의 역습
Advanced Debugging Using Java Bytecodes
Networking Core Concept
Java Concurrency by Example
Finding Clojure
Come on, PHP 5.4!
Evolving with Java - How to Remain Effective
JDBC Core Concept
Collection Core Concept
GeeCON 2017 - TestContainers. Integration testing without the hassle
JEEConf 2017 - Having fun with Javassist
Eclipse Collections, Java Streams & Vavr - What's in them for Functional Pro...
PostgreSQL and PL/Java
ReactiveCocoa workshop
Java 8 Stream API and RxJava Comparison
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
apache tajo 연동 개발 후기
The Ring programming language version 1.5.2 book - Part 25 of 181
Практическое применения Akka Streams
«Практическое применение Akka Streams» — Алексей Романчук, 2ГИС
모던자바의 역습
Ad

Similar to JDI 2.0. Not only UI testing (20)

PDF
Journey's diary developing a framework using tdd
PDF
Test Driven Development with JavaFX
PDF
Analysis of software systems using jQAssistant and Neo4j
ODP
Alexandre.iline rit 2010 java_fxui_extra
ODP
Alexandre Iline Rit 2010 Java Fxui
PDF
Unit testing (eng)
PPTX
Coding Naked
PPTX
A brief overview of java frameworks
DOC
Cs6502 ooad-cse-vst-au-unit-v dce
PDF
JavaFAQS
PDF
Java j2 ee job interview companion k.arulkumaran
ODP
Alexandre Iline Rit 2010 Java Fxui
PDF
Automating JFC UI application testing with Jemmy
PPTX
GeeCON 2012 hurdle run through ejb testing
PDF
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
DOCX
NCC assingment l4dc ddoocp
KEY
Scala Introduction
PDF
Advanced Java (Revised Syllabus) [QP / April - 2015]
PPT
Darius Silingas - From Model Driven Testing to Test Driven Modelling
PDF
Pragmatic Java Test Automation
Journey's diary developing a framework using tdd
Test Driven Development with JavaFX
Analysis of software systems using jQAssistant and Neo4j
Alexandre.iline rit 2010 java_fxui_extra
Alexandre Iline Rit 2010 Java Fxui
Unit testing (eng)
Coding Naked
A brief overview of java frameworks
Cs6502 ooad-cse-vst-au-unit-v dce
JavaFAQS
Java j2 ee job interview companion k.arulkumaran
Alexandre Iline Rit 2010 Java Fxui
Automating JFC UI application testing with Jemmy
GeeCON 2012 hurdle run through ejb testing
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
NCC assingment l4dc ddoocp
Scala Introduction
Advanced Java (Revised Syllabus) [QP / April - 2015]
Darius Silingas - From Model Driven Testing to Test Driven Modelling
Pragmatic Java Test Automation
Ad

More from COMAQA.BY (20)

PDF
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
PPTX
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
PPTX
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
PPTX
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
PPTX
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
PPTX
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
PPTX
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
PPTX
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
PPTX
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
PPTX
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
PPTX
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
PPTX
Моя роль в конфликте
PPTX
Организация приемочного тестирования силами матерых тестировщиков
PPTX
Развитие или смерть
PPTX
Системный взгляд на параллельный запуск Selenium тестов
PPTX
Эффективная работа с рутинными задачами
PPTX
Как стать синьором
PPTX
Open your mind for OpenSource
PPTX
Out of box page object design pattern, java
PDF
Static and dynamic Page Objects with Java \ .Net examples
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
Моя роль в конфликте
Организация приемочного тестирования силами матерых тестировщиков
Развитие или смерть
Системный взгляд на параллельный запуск Selenium тестов
Эффективная работа с рутинными задачами
Как стать синьором
Open your mind for OpenSource
Out of box page object design pattern, java
Static and dynamic Page Objects with Java \ .Net examples

Recently uploaded (20)

PDF
KodekX | Application Modernization Development
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation theory and applications.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
KodekX | Application Modernization Development
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation theory and applications.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Dropbox Q2 2025 Financial Results & Investor Presentation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Digital-Transformation-Roadmap-for-Companies.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
NewMind AI Monthly Chronicles - July 2025
Advanced methodologies resolving dimensionality complications for autism neur...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
Spectral efficient network and resource selection model in 5G networks
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

JDI 2.0. Not only UI testing

Editor's Notes

  • #3: Работаю в компании Epam в