End to End Testing - Before You Get Started

A lot of articles have been written on the topic end-to-end testing. I won’t cover the basics here. In this post I want to draw your attention to some questions, you should answer before you start even looking for a framework. And.. start slow! Here is my story: In my last job I inherited the task to write end-to-end tests, so it was somehow easy to get started. We were using protractor, angular was still hot in these days....

January 23, 2019 · 5 min · Markus Ruepp

Automate the UI-test Automation

Test automation especially ui test automation is like a huge jenga tower, everything is always about to collapse. How can we rely on them? Only run stable tests (stability) Keep the execution time low (performance) Only run the important tests for first feedback (performance) Loosly coupled with the code under test (maintenance) A test should have a maintainer that is required to fix it (maintenance) A failing test should express what functionality has been broken, ideally in a way even non-tech people can understand (maintenance) ...

August 29, 2018 · 1 min · Markus Ruepp

Perceptual Diff Testing

One goal of successful testing is decoupling the tests from the code under test, with the goal to reduce the need for maintenance of the test code, when changing the actual code. Perceptual Differences (pdiff) is one approach to achieve that goal. Enriched with protractor, its possible to compare screenshots within a flow. "...

March 19, 2018 · 1 min · Markus Ruepp

Protractor find element in context (Snippet)

var myForm = element(by.css('form')); var myInput = myForm.element(by.css('input')); ...

March 16, 2017 · 1 min · Markus Ruepp

Testing using protractor, lessons learned

A failing test should tell you what is wrong and not the area. Abstract everything by using components. We reuse the component architecture of the webapp in the unit test and protractor tests. E.g. two pages with the same datpicker component will also use only only one datepicker protractor component. protractor only returns promises This is annoying for debugging use beforeAll to speed up tests. If possible try to use beforeAll instead of beforeEach....

February 22, 2017 · 1 min · Markus Ruepp

karma tests with $interval

Using $interval instead of the JavaScript native setInteval gives you more control in your tests. $interval works synchronously and will wait until you feed it with time offsets, using $interval.flush(<msecs>) ...

May 25, 2016 · 1 min · Markus Ruepp