Posts

Showing posts from 2018

Functional and visual E2E regression automation combined: Galen and Serenity

Image
In out latest project I was free to choose what to use for E2E tests. No requirements from clients, awesome! I’m not impressed by Cucumber-based syntax for E2E tests. On the other hand, I do understand client need for nice looking and readable E2E automation reports. Let’s be honest, that’s why most of them choose Cucumber - reports are business oriented when you write tests this way. The project was very oriented towards "everything must look pixel-perfect" and lots of requirements which looked like "if amount of items received if 1, use Layout1; for 2 items use Layout2; else use Layout3". So I've thought I'll try to combine two frameworks: Serenity for pretty reporting and Galen for visual regression automation. Actually I loved both of them, and Serenity has much more than pretty reporting ;) Here’s a quick overview of “the good, the bad and the ugly” after project is finished. Frameworks used: Serenity BDD Galen Programming language: Java. ...

TDTD, or Unit testing Selenium tests

I liked the idea to call this "Test Driven Test Development"! So this is time for my input to discussions "I'm writing Selenium tests. Do I need to unit test them?" You can replace "Selenium" with any of frameworks which uses it, if you wish. As the correct answer is "it depends", here's my opinion when it's worth doing this. At the moment I've started automating huge system, which is not so complex when looking at what it does, but it's a challenge in another areas: - main goal is to save and display lots of data about countries. Names, demographic data, national holidays, various geographic facts etc. etc. - part of it is a legacy system. Some parts are being rewritten, some will stay as they are for a long time. Or maybe not. They can be rewritten any time. By "legacy" I mean - you remember those times, when main methods for formatting html page layout were "you put a table inside a table of a table of....

Visual test automation: Galen tests and Java (Part 2 of "mobile native")

First things I needed to do for my "let's try to do visual test automation of mobile native apps using Galen" project: - to understand how Galen Framework is working with "normal" web sites; - learn to call it from my Java tests; - ensure Java Page Object model can be used and @objects descriptions can be removed from Galen specs. We need this to keep objects described only once and in single place so that they could be used for both Galen and functional tests. I've used resources provided by Galen Framework - sample Galen Java tests and sample web site for those tests as a starting point. To run the web site locally on my PC I've used a very simple Fenix webserver (Galen Framework provides public access to the test website , but I prefer to use local copy for my experiments). The only change I've made initially - updated tests to use Chrome browser instead of default Firefox; it's so much less problems running tests this way at the mo...

Visual test automation: mobile native (Part 1)

I feel I'm moving to next stage of my current "let's try this" project, so it's time to structure my current notes on what I've been doing for some time. This time it's visual test automation. It's one of the current trends with (possibly) the biggest player Applitools at the moment. Frankly, I love what Applitools have achieved and where they are going, and options they suggest look great for commercial projects. For non-commercial and not open source projects, especially when you are  learning new things, paying for cloud based services is not what you want. So I've decided to go another way and start with visual test automation for "works from my PC" kind of tests. Why visual test automation? Well, there were several main factors: - it's interesting and new, I've never tried this; - we have an app at work, which is not commercial product, but we need it to be stable and release bug fixes / new features fast; - this app is...

Allure reporter, Gradle and JUnit5

Have been playing with JUnit5, Gradle and Allure reporting framework this weekend. A rather "fresh" JUnit5 GA release, some functionality not fully supported in Gradle / IntelliJ, and latest beta from Allure. This sounds so much like me - I want to get it working! Found lots of configuration samples on web, so won't duplicate info here - most of them are correct. Well, there are some outdated info, especially in Allure config parts, but it's not so difficult to sort out what you need. The only thing missing in my case was what to look for in configs when your allure-results folder is always generated in PROJECT_ROOT directory instead of PROJECT_ROOT/build . If allure-results is somewhere else - fails allureReport and allureServe . So either you get that folder where it is expected by default configs, or try to reconfigure a lot more. As I'm working with beta - I'd prefer to use as much defaults as possible at the beginning. The only thing which helped -...