Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug
-
Upload
- -
Category
Engineering
-
view
22 -
download
2
Transcript of Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug
![Page 1: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/1.jpg)
QA Battle ofAutomation Approaches
Элементы с типизацией (JDI)vs. элементы без типизации (Selenide)
Roman Iovlev Alexei Vinogradov
![Page 2: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/2.jpg)
Chief QA AutomationIn Testing more than 11 yearsIn Testing Automation 9 years
ROMAN IOVLEV
![Page 3: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/3.jpg)
Alexei VinogradovIT-Kонсультант
тестирование, управление тестированием, автоматизация в тестировании, коучинг
15+ лет в IT, докладчик SQA Days / Codefest / QA Fest
Студент-практикант -> Программист -> Тестировщик ->…
![Page 4: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/4.jpg)
![Page 5: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/5.jpg)
TYPIFIED ELEMENTS
10 DEC 2016
![Page 6: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/6.jpg)
TYPIFIED ELEMENTS VS SUPER ELEMENT
6
VS
WebElementSelenideElement
![Page 7: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/7.jpg)
SIMPLE BUT…
6
$(“#submit”).click();
$(“#submit”).click();
$(“#submit”).click();
$(“#submit”).click();
$(“#submit”).click();
$(“#submit”).click();
$(“#submit”).click();
$(“#submit”).click();
private SelenideElement colorsArrow = $(“#color-arrow“);private List<SelenideElement> colorsValues = $$(“#colors li“);private SelenideElement colorsValue = $(“#colors“);
public void selectColor(String color) { colorsArrow.click(); colorsValues.filter(text(color)).first().click();}public String getColor() { colorsValue.text();}
private SelenideElement submitButton= $(“.submit”)
![Page 8: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/8.jpg)
3 DROPDOWNS
6
private SelenideElement colorsArrow = $(“#color-arrow“);private List<SelenideElement> colorsValues = $$(“#colors li“);private SelenideElement colorsValue = $(“#colors“);private SelenideElement typesArrow = $(“#type-arrow“);private List<SelenideElement> typesValues = $$(“#types li“);private SelenideElement typesValue = $(“# types“);private SelenideElement shapesArrow = $(“#shape-arrow“);private List<SelenideElement> shapesValues = $$(“#shapes li“);private SelenideElement shapesValue = $(“#shapes “);
public void selectColor(String color) { colorsArrow.click(); colorsValues.filter(text(color)).first().click();}public String getColor() { colorsValue.text();}public void selectType(String type) { typesArrow.click(); typesValues.filter(text(type)).first().click();}public String getType() { typesValue.text();}public void selectShape(String shape) { shapesArrow.click(); shapesValues.filter(text(shape)).first().click();}public String getShape() { shapesValue.text();}
![Page 9: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/9.jpg)
SO OBVIOUS
6
@JDropdown(expand= “#color-arrow“ list = “#colors li" value = “#colors")public Dropdown colors;
@JDropdown(expand= “#type-arrow“ list = “#types li" value = “#types")public Dropdown types;
@JDropdown(expand= “#shape-arrow“ list = “#shapes li" value = “#shapes")public Dropdown shapes;
• Десятки элементов (> 30 элементов)
• Сотни методов (в ITable > 100)
Actions
Control
ControlBusiness
![Page 10: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/10.jpg)
SIMPLE BUT…
6
open(“http://my.site.com”);
homePage.open();
open(“http://my.site.com”);open(“http://my.site.com”);
public class HomePage { public void open() { open(“http://my.site.com”); } …}
open(“http://my.site.com”);
![Page 11: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/11.jpg)
SAVINGS
6
1. Save your time2. Save your Client money3. Get tests with more quality4. Do more interesting things
![Page 12: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/12.jpg)
SHORT & OBVIOUS
5
public class Filter { public WebElement submitButton; public WebElement followMeLink; public WebElement navigation; public WebElement colors; public WebElement areas; public WebElement settings; public WebElement tags; public WebElement shirtSizes; public WebElement vote; public WebElement rating;
}
public class Filter { public Button submit; public Link followMe; public Menu navigation; public Dropdown colors; public Tabs areas; public Checklist settings; public ComboBox tags; public DropList shirtSizes; public Selector vote; public RadioButtons rating;
}
public class Filter { public _ submitButton; public _ followMeLink; public _ navigation; public _ colors; public _ areas; public _ settings; public _ tags; public _ shirtSizes; public _ vote; public _ rating;
}
public class Filter { public SelenideElement submitButton; public SelenideElement followMeLink; public SelenideElement navigation; public SelenideElement colors; public SelenideElement areas; public SelenideElement settings; public SelenideElement tags; public SelenideElement shirtSizes; public SelenideElement vote; public SelenideElement rating;
}
![Page 13: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/13.jpg)
click()
isDisplayed()
is()
sendKeys()
attr()
shouldHave()
should()
getLocation()
find()
findElement()
getText()
getCoordinates()
$()
$$()
append()
clickContext()
closest()
…
ONLY USABLE ACTIONS
5
Button submitButton. click()getText()
SelenideElement submitButton.
![Page 14: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/14.jpg)
LOGS & REPORTING
5
Click on Login Button Get Row with “Type=Approved” from Products Table Select “Blue” in Color Dropdown Login with “CorrectUser” …
![Page 15: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/15.jpg)
WORK WITH OBJECTS
5
• registerForm.save(vipClient);• searchForm.find(product);• List<Product> products = products.entities(p -> p.Type == “shoes”);• Card products = cards.entity(c -> c.Status == APPROVED && c.Name.contains(“Duke”));• …ITable products;ITable cards;
EntityDrivenTesting
![Page 16: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/16.jpg)
WIND OF CHANGE
3
• Fast writing one test• Small projects (< 4 months)• Selenide is better engine
than Selenium but still an engine layer
• Fast writing bunch of tests• Midle-Large projects (> 6 months)• JDI is an UI Automation
Framework and represents Application/Business layer
![Page 17: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/17.jpg)
PLATO'S THEORY OF FORMS
5
No application but you can write UI Objects (Page Objects )
IButton
![Page 18: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/18.jpg)
INTERFACES
5
IButton submit;IDropdown cities;ITable products;
MapInterfaceToElement.update( new Object[][]{ { IDropDown.class, MyDropDown.class}, { IButton.class, MyButton.class}, { ITable.class, CustomTable.class} });
![Page 19: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/19.jpg)
EVERYBODY DO IT
6
1. Save a lot of time - money2. More obvious test scenarios, page objects,
logs, reports – easier develop & support3. Operate with real business Objects4. Write UI Objects (Page Objects) without app5. Easier scenarios reusage on different platforms
![Page 20: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/20.jpg)
20
WEB TESTING 2.0
PageObjects
Smoke Tests
![Page 21: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/21.jpg)
BE LAZY
6
![Page 22: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/22.jpg)
22
PLANS
23
![Page 23: Roman iovlev battle - typified or not tepified elements jdi vs selenide - Heisenbug](https://reader033.fdocuments.in/reader033/viewer/2022042619/58ce97331a28ab8c3b8b6975/html5/thumbnails/23.jpg)
23
CONTACTS
HTTP://JDI.EPAM.COM/HTTPS://VK.COM/JDI_FRAMEWORK
https://github.com/epam/JDI
INFO CONTACTS