QA Battle on Heisenbug
http://2016.heisenbug-moscow.ru/talks/qa-battle-pageobjects-with-jdi-vs-without-selenide-typisation/
Почему типизированные элементы (Button, Image, Checkbox, Link) в UI тестах — зло? Или не типизированные (SelenideElement for ´em all!) ещё хуже? Как правильно писать PageObjects и тесты с ними? Удобно иметь иерархию предопределенных объектов или нет? Краткость — сестра таланта, или простота хуже воровства? Впервые на арене (гладиаторской, не думайте) QA-конференции состоится баттл между силами Selenide и JDI! Приходите на битву и решите своими голосами, какая из концепций уйдет со щитом, а какая — в историю.
9. 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
Control
Business
11. SAVINGS
6
1. Save your time
2. Save your Client money
3. Get tests with more quality
4. Do more interesting things
12. 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;
}
14. LOGS & REPORTING
5
Click on Login Button
Get Row with “Type=Approved” from Products Table
Select “Blue” in Color Dropdown
Login with “CorrectUser”
…
16. 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
17. PLATO'S THEORY OF FORMS
5
No application but you can write UI Objects (Page Objects )
IButton
19. EVERYBODY DO IT
6
1. Save a lot of time - money
2. More obvious test scenarios, page objects,
logs, reports – easier develop & support
3. Operate with real business Objects
4. Write UI Objects (Page Objects) without app
5. Easier scenarios reusage on different platforms