SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

Tendances (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ГИС
 
모던자바의 역습
모던자바의 역습모던자바의 역습
모던자바의 역습
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 

Dernier (20)

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 

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;

Notes de l'éditeur

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