Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

QA Fest 2017. Яков Крамаренко. Minimum Usable Framework

142 views

Published on

Должно быть очевидно, что написание фреймворка с нуля на каждом новом проекте одного и то же типа - трата времени. Вероятно дожно быть какое то ядро которое можно переиспользовать с целью быть более эффективным. Но где же та граница между ядром и супер-супер кухонным комбайном который в конце концов будет ограничивать переиспользование. В этом докладе мы попробуем определить тот минимальный набор фич такого ядра на примере построения фреймворка для автоматизации веб приложений.

Published in: Education
  • Be the first to comment

  • Be the first to like this

QA Fest 2017. Яков Крамаренко. Minimum Usable Framework

  1. 1. Minimum Valuable Framework
  2. 2. Part 1 :) Minimum Valuable Framework
  3. 3. yashaka @ About QAA Director @
  4. 4. Preface There are good practices in context, but there are no best practices. (c) Cem Kaner, James Bach
  5. 5. Minimum Valuable Usable Framework …
  6. 6. Framework?
  7. 7. Framework Library vs
  8. 8. Library Browser automation tool fast, standard, powerful, low level Lacks: lazy elements implicit waits for visibility readability handy assertions Informative errors Custom action hooks TEST automation tool slower, pretty powerful, user oriented Has: lazy elements implicit waits for visibility readability handy assertions ~ “Informative errors” Some hooks… Limits: In integration with 3rd party (Driver management, Configuration) Opinionated: … Framework
  9. 9. Library Browser automation tool fast, standard, powerful, low level Lacks: lazy elements implicit waits for visibility readability handy assertions Informative errors Custom action hooks Framework TEST automation tool slower, pretty powerful, user oriented Has: lazy elements implicit waits for visibility readability handy assertions ~ “Informative errors” Some hooks… Limits:… Opinionated: Static Driver SuperRadioSelectEtcElement
  10. 10. Static Driver?
  11. 11. Static driver? vs BaseTest:) public class BaseTest { public static WebDriver driver = new ChromeDriver(); @AfterClass public static void driverTearDown() { driver.quit(); } public void open(String url) { return driver.get(url); } public WebElement $(String css) { return driver.findElement(By.cssSelector(css)); } public List<WebElement> $$(String css) { return driver.findElements(By.cssSelector(css)); } }
  12. 12. public class TodoMvcTest extends BaseTest { @Test public void adds_task() { open("http:!//todomvc.com/examples/emberjs/"); $("#new-todo").sendKeys("a" + Keys.ENTER); $("#new-todo").sendKeys("b" + Keys.ENTER); $("#new-todo").sendKeys("c" + Keys.ENTER); assertEquals("a", $$("#todo-list>li").get(0).getText()); assertEquals("b", $$("#todo-list>li").get(1).getText()); assertEquals("c", $$("#todo-list>li").get(2).getText()); assertEquals(3, $$("#todo-list>li").size()); } } Static driver? vs BaseTest:)
  13. 13. SuperRadioSelectEtcElement? vs …
  14. 14. SuperRadioSelectEtcElement? vs … public class RegistrationTest extends BaseTest { @Test public void registers() { !!... $(“#first-name").setValue("Iakiv"); $(“#last-name").setValue("Kramarenko"); $(“#sex").selectRadio("Mail"); $(“#country").selectOption("Ukraine"); … } }
  15. 15. SuperPlatypusElement? vs …
  16. 16. SuperPlatypusElement? vs Widgets public class RegistrationTest extends BaseTest { @Test public void registers() { !!... new Box("#first-name").set("Iakiv"); new Box("#last-name").set("Kramarenko"); new Radio("#sex").set("Mail"); new Select("#country").set("Ukraine"); … } }
  17. 17. SuperPlatypusElement? vs Widgets public class RegistrationTest extends BaseTest { @Test public void registers() { !!... form.box(“#first-name").set("Iakiv"); form.box(“#last-name").set("Kramarenko"); form.radio(“#sex").set("Mail"); form.select(“#country").set("Ukraine"); … } }
  18. 18. SuperPlatypusElement? vs Freedom public class RegistrationTest extends BaseTest { @Test public void registers() { !!... new SuperElement(“#first-name").setValue("Iakiv"); new SuperElement(“#last-name").setValue("Kramarenko"); new SuperElement(“#sex").selectRadio("Mail"); new SuperElement(“#country").selectOption("Ukraine"); … } }
  19. 19. SuperPlatypusElement? vs Freedom public class RegistrationTest extends BaseTest { @Test public void registers() { !!... _(“#first-name”).setValue("Iakiv"); _(“#last-name”).setValue("Kramarenko"); _(“#sex”).selectRadio("Mail"); _(“#country”).selectOption("Ukraine"); … } }
  20. 20. Library Browser automation tool fast, standard, powerful, low level Lacks: lazy elements implicit waits for visibility readability handy assertions Informative errors Custom action hooks Framework TEST automation tool slower, pretty powerful, user oriented Has: lazy elements implicit waits for visibility readability handy assertions ~ “Informative errors” Some hooks… Limits:… Opinionated: Static Driver SuperRadioSelectEtcElement MUF?
  21. 21. LibraryFramework MUF? TEST automation tool lazy elements implicit waits for action succeeded handy assertions informative errors readable consistent natural (PlatypusElement) user oriented As less opinionated as possible
  22. 22. Demo
  23. 23. - food for the brain inDependency
  24. 24. - food for the brain Technical Feng shui vs Team & Processes
  25. 25. - food for the brain
  26. 26. Afterwords There are good practices in context, but there are no best practices. (c) Cem Kaner, James Bach
  27. 27. Q&A
  28. 28. Thank you! k-expert.com yashaka @
  29. 29. We are hiring;) k-expert.com yashaka @

×