Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Feedback Rápido com Testes Automatizados (CBSOF...

Feedback Rápido com Testes Automatizados (CBSOFT 2013)

Avatar for Andre Abe Vicente

Andre Abe Vicente

September 30, 2013

Other Decks in Technology

Transcript

  1. seleniumPagSeguro.clicar("#button");! seleniumPagSeguro.aguardarElementoVisivel( "#menu");! public class SeleniumPagSeguro {! private SeleniumWebDriver selenium;!

    public void clicar(String nomeDoElemento) {! Element elemento = recuperarElemento(nomeDoElemento);! selenium.click(elemento);! }!
  2. ! ! public class PaginaDeLogin {! ! public TelaLogada logar(Usuario

    usuario) {! seleniumPagSeguro.preencherCampo(localizar CampoLogin(), usuario.getNome());! . . .! return new TelaLogada();! }! private String localizarCampoLogin() {! return “#campo-login”;! }!
  3. public class ScreenshotTestRule implements MethodRule {! ...! public Statement apply(final

    Statement statement, final FrameworkMethod frameworkMethod, final Object o) {! ...! try {! statement.evaluate();! } catch (Throwable t) {! captureScreenshot(frameworkMethod);! throw t; ! }! …! }!
  4. Paralelização Variáveis estáticas Flags de sistema / JMX static WebDriver

    webdriver;! meiosDePagamento.desativar(CARTAO_DE_CREDITO);!
  5. OK Banco de dados OK Gateway NOK Correios OK Cadastro

    Testes-Core . . . . . . . OK Sep 29 2013 Testes-Checkout . . NOK Sep 29 2013