SlideShare a Scribd company logo
1 of 32
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

What's hot

Advanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesAdvanced Debugging Using Java Bytecodes
Advanced Debugging Using Java BytecodesGanesh Samarthyam
 
Come on, PHP 5.4!
Come on, PHP 5.4!Come on, PHP 5.4!
Come on, PHP 5.4!paulgao
 
Evolving with Java - How to Remain Effective
Evolving with Java - How to Remain EffectiveEvolving with Java - How to Remain Effective
Evolving with Java - How to Remain EffectiveNaresha K
 
GeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassleGeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassleAnton Arhipov
 
JEEConf 2017 - Having fun with Javassist
JEEConf 2017 - Having fun with JavassistJEEConf 2017 - Having fun with Javassist
JEEConf 2017 - Having fun with JavassistAnton Arhipov
 
Eclipse Collections, Java Streams & Vavr - What's in them for Functional Pro...
Eclipse Collections, Java Streams & Vavr - What's in them for  Functional Pro...Eclipse Collections, Java Streams & Vavr - What's in them for  Functional Pro...
Eclipse Collections, Java Streams & Vavr - What's in them for Functional Pro...Naresha K
 
ReactiveCocoa workshop
ReactiveCocoa workshopReactiveCocoa workshop
ReactiveCocoa workshopEliasz Sawicki
 
Java 8 Stream API and RxJava Comparison
Java 8 Stream API and RxJava ComparisonJava 8 Stream API and RxJava Comparison
Java 8 Stream API and RxJava ComparisonJosé Paumard
 
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloadingRiga DevDays 2017 - The hitchhiker’s guide to Java class reloading
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloadingAnton Arhipov
 
apache tajo 연동 개발 후기
apache tajo 연동 개발 후기apache tajo 연동 개발 후기
apache tajo 연동 개발 후기효근 박
 
The Ring programming language version 1.5.2 book - Part 25 of 181
The Ring programming language version 1.5.2 book - Part 25 of 181The Ring programming language version 1.5.2 book - Part 25 of 181
The Ring programming language version 1.5.2 book - Part 25 of 181Mahmoud Samir Fayed
 
Практическое применения Akka Streams
Практическое применения Akka StreamsПрактическое применения Akka Streams
Практическое применения Akka StreamsAlexey Romanchuk
 
«Практическое применение Akka Streams» — Алексей Романчук, 2ГИС
«Практическое применение Akka Streams» — Алексей Романчук, 2ГИС«Практическое применение Akka Streams» — Алексей Романчук, 2ГИС
«Практическое применение Akka Streams» — Алексей Романчук, 2ГИС2ГИС Технологии
 
모던자바의 역습
모던자바의 역습모던자바의 역습
모던자바의 역습DoHyun Jung
 

What's hot (20)

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

Similar to JDI 2.0. Not only UI testing

Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android DevelopmentJussi Pohjolainen
 
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"epamspb
 
Evolving with Java - How to remain Relevant and Effective
Evolving with Java - How to remain Relevant and EffectiveEvolving with Java - How to remain Relevant and Effective
Evolving with Java - How to remain Relevant and EffectiveNaresha K
 
Java 8 new features or the ones you might actually use
Java 8 new features or the ones you might actually useJava 8 new features or the ones you might actually use
Java 8 new features or the ones you might actually useSharon Rozinsky
 
J2ME Lwuit, Storage & Connections (Ft Prasanjit Dey)
J2ME Lwuit, Storage & Connections (Ft   Prasanjit Dey)J2ME Lwuit, Storage & Connections (Ft   Prasanjit Dey)
J2ME Lwuit, Storage & Connections (Ft Prasanjit Dey)Fafadia Tech
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy codeShriKant Vashishtha
 
Intro to Retrofit 2 and RxJava2
Intro to Retrofit 2 and RxJava2Intro to Retrofit 2 and RxJava2
Intro to Retrofit 2 and RxJava2Fabio Collini
 
A evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no androidA evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no androidRodrigo de Souza Castro
 
Developing Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersDeveloping Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersSaeid Zebardast
 
Roman iovlev. Test UI with JDI - Selenium camp
Roman iovlev. Test UI with JDI - Selenium campRoman iovlev. Test UI with JDI - Selenium camp
Roman iovlev. Test UI with JDI - Selenium campРоман Иовлев
 
Future of UI Automation testing and JDI
Future of UI Automation testing and JDIFuture of UI Automation testing and JDI
Future of UI Automation testing and JDICOMAQA.BY
 
Jersey framework
Jersey frameworkJersey framework
Jersey frameworkknight1128
 
How to Start Test-Driven Development in Legacy Code
How to Start Test-Driven Development in Legacy CodeHow to Start Test-Driven Development in Legacy Code
How to Start Test-Driven Development in Legacy CodeDaniel Wellman
 
Architecture Components
Architecture ComponentsArchitecture Components
Architecture ComponentsSang Eel Kim
 
Android Architecture - Khoa Tran
Android Architecture -  Khoa TranAndroid Architecture -  Khoa Tran
Android Architecture - Khoa TranTu Le Dinh
 

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

greenDAO
greenDAOgreenDAO
greenDAO
 
Functional Programming
Functional ProgrammingFunctional Programming
Functional Programming
 
Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android Development
 
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
 
Initial Java Core Concept
Initial Java Core ConceptInitial Java Core Concept
Initial Java Core Concept
 
Evolving with Java - How to remain Relevant and Effective
Evolving with Java - How to remain Relevant and EffectiveEvolving with Java - How to remain Relevant and Effective
Evolving with Java - How to remain Relevant and Effective
 
Java 8 new features or the ones you might actually use
Java 8 new features or the ones you might actually useJava 8 new features or the ones you might actually use
Java 8 new features or the ones you might actually use
 
J2ME Lwuit, Storage & Connections (Ft Prasanjit Dey)
J2ME Lwuit, Storage & Connections (Ft   Prasanjit Dey)J2ME Lwuit, Storage & Connections (Ft   Prasanjit Dey)
J2ME Lwuit, Storage & Connections (Ft Prasanjit Dey)
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy code
 
Intro to Retrofit 2 and RxJava2
Intro to Retrofit 2 and RxJava2Intro to Retrofit 2 and RxJava2
Intro to Retrofit 2 and RxJava2
 
A evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no androidA evolução da persistência de dados (com sqlite) no android
A evolução da persistência de dados (com sqlite) no android
 
Developing Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersDeveloping Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginners
 
Roman iovlev. Test UI with JDI - Selenium camp
Roman iovlev. Test UI with JDI - Selenium campRoman iovlev. Test UI with JDI - Selenium camp
Roman iovlev. Test UI with JDI - Selenium camp
 
Future of UI Automation testing and JDI
Future of UI Automation testing and JDIFuture of UI Automation testing and JDI
Future of UI Automation testing and JDI
 
Java 5 and 6 New Features
Java 5 and 6 New FeaturesJava 5 and 6 New Features
Java 5 and 6 New Features
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
 
How to Start Test-Driven Development in Legacy Code
How to Start Test-Driven Development in Legacy CodeHow to Start Test-Driven Development in Legacy Code
How to Start Test-Driven Development in Legacy Code
 
Android best practices
Android best practicesAndroid best practices
Android best practices
 
Architecture Components
Architecture ComponentsArchitecture Components
Architecture Components
 
Android Architecture - Khoa Tran
Android Architecture -  Khoa TranAndroid Architecture -  Khoa Tran
Android Architecture - Khoa Tran
 

More from COMAQA.BY

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

More from COMAQA.BY (20)

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

Recently uploaded

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

JDI 2.0. Not only UI testing

  • 1. JDI – NOT ONLY UI 22 OCTOBER 2017
  • 2. Chief QA Automation In Testing more than 12 years In Testing Automation 10 years ROMAN IOVLEV roman.Iovlev roman_iovlev@epam.com
  • 3. 3 ?
  • 4. • UI Test Framework • UI Elements oriented • Dozens of UI elements already implemented • Most of common problems already solved (e.g. stabilization) 4 JDI
  • 5. • UI Test Framework • UI Elements oriented 5 JDI
  • 6. • UI Test Framework • UI Elements oriented • Interfaces above engines 6 JDI
  • 8. @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
  • 9. @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
  • 10. 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
  • 11. 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;
  • 12. @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
  • 14. 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();
  • 15. 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”;
  • 16. 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
  • 17. 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
  • 18. 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();
  • 19. 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
  • 20. 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)”
  • 21. 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);
  • 22. 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);
  • 24. 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
  • 25. <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;
  • 28. @Image(“/src/test/resources/submitbtn.png”) @FindBy(text = “Submit”) public Button submit; 28 VERIFY LAYOUT submit.isDisplayed(); submit.assertDisplayed();
  • 29. @ImagesFolder(“/src/test/resources/imgs”) public EpamSite extends WebSite; 29 VERIFY LAYOUT @Image(“submitbtn.png”) @FindBy(text = “Submit”) public Button submit;
  • 30. 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. 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;

Editor's Notes

  1. Работаю в компании Epam в