background preloader

Test (FC, UI ...)

Facebook Twitter

Tutoriel pour tester une webapp à l'aide de FluentLenium, en 5 minutes. Les nouveaux frameworks de tests d'UI. Introduction Comment tester mon application web dès la phase de développement, de manière industrialisable ? Les interfaces graphiques ont longtemps été boudées par les tests automatisés. Si la plupart des applications étaient testées manuellement, on connaissait aussi un outil de tests industrialisés : Selenium avec son API plutôt complète mais également sa lourdeur.

Rappelez-vous, un serveur Jetty devait être démarré pour lancer nos tests, l’intégration au job Maven pour les projets Java n’était pas triviale, et il était difficile de continuer à développer sur nos machines quand la RAM était monopolisée et l’écran inondé de nouvelles fenêtres navigateur pour effectuer les tests en conditions réelles. Avec la véritable expansion des frameworks JavaScript, les outils des développeurs front ont également évolué et proposent des tests d’interface faciles à mettre en œuvre.

CasperJS Dans cet article, on détaillera l’utilisation de la version stable actuelle (1.0). Installation L’API Casper Zombie. Introduction à SpecFlow. 16 avril 2013 Bonjour, aujourd’hui nous allons parler de SpecFlow, un petit framework de test que je classerai dans une rubrique de BDD (Behavior Driven Development) puisqu’il propose de faire des tests unitaires en langage courant. L’écriture des tests se divise donc en deux parties : le comportement du test sera écrit par le responsable des spécifications du projet tandis que le pendant technique de ces tests restera à la charge du développeur.

Présentation de SpecFlow Specflow est un petit framework de spécification et de test unitaires. Sa mission est de faire le pont entre les personnes qui spécifient un projet et ceux qui le développent. Il se base su un principe de BDD : la spécification par l’exemple. Utilisé au lancement d’un projet, il va permettre de définir les comportements souhaités de l’application et ainsi de ne pas développer ce qui n’est pas spécifié. Pour cela, vous allez devoir créer deux types de fichiers : Déjà, un découpage se fait. La syntaxe Gherkin Les bonus. Selenium WebDriver — Selenium Documentation. NOTE: We’re currently working on documenting these sections.

We believe the information here is accurate, however be aware we are also still working on this chapter. Additional information will be provided as we go which should make this chapter more solid. Introducing WebDriver The primary new feature in Selenium 2.0 is the integration of the WebDriver API. WebDriver is designed to provide a simpler, more concise programming interface in addition to addressing some limitations in the Selenium-RC API.

Selenium-WebDriver was developed to better support dynamic web pages where elements of a page may change without the page itself being reloaded. WebDriver’s goal is to supply a well-designed object-oriented API that provides improved support for modern advanced web-app testing problems. How Does WebDriver ‘Drive’ the Browser Compared to Selenium-RC? Selenium-WebDriver makes direct calls to the browser using each browser’s native support for automation. WebDriver and the Selenium-Server Java <? Selenium from scratch « Diving deep into JEE. Hi reader, If you’re concerned with testing then you’ve already came accross the difficult task of UI testing. We all agree that fat client model is different from thin client’s but they share common characteristics: screens and transitions between screens.

Testing them is different but seems equaly difficult. We will cover thin UI ie web site pages testing. Before thinking about the “how”, we’ll think of the “what”. Every UI is a set of screens (we pages in our case). Pages display data in UI components. The other very important behaviour to test is the transitions between screens. We will test 2 transitions: a successful form submission and a failure.Selenium is a tool that allows some arbitrary piece of code to describe a behaviour against a target browser. Lets build a simple example that illustrates the concepts. First create a web project. Re-run mvn archetype:generate, choose the right number (45 in my example) and follow the instructions. Check that everything runs fine Like this: