Skip to Content
Author's profile photo Klaus Haeuptle

Basic Patterns for Testable JavaScript Code

On the last GTAC Mark Trostler (a Google Software Engineer) has given a presentation about testable JavaScript Code and how testability relates to high quality code and adaptivity to requirement changes. You can apply these principles also to SAPUI5 development.  In the next weeks I am going to publish several blog posts around specific aspects of the testability of SAPUI5 applications. This video introduces some basics and I can really recommend watching the video:

Mark Trostler (Google): Testable JavaScript is a process. Whether starting with a blank slate or an already implemented application (or somewhere in-between) being able to test your JavaScript code simply, cleanly, and effectively is a necessary feature.

While JavaScript is unique due to the myriad of environments within which it runs, there are several tried and true ‘testable’ methodologies from other languages which also hold true for JavaScript. And of course there remain the unique challenges that JavaScript developers must face while writing and testing their code. What patterns make code testable? Which anti-patterns hinder testing? What metrics and common sense guideposts can be used to measure the testability of our code? Once the process of creating testable code has started now what?

Join me to break down the process of writing testable JavaScript. We will investigate ideas, patterns, and methodologies that greatly increase the testability, and hence the maintainability, correctness, and longevity of your code. Whether you write client- or server-side JavaScript mastering this process will greatly enhance the quality of your code.”



This blog post is part of a series, like the following blog post to stay tuned and get updates about more topics around software engineering with SAPUI5 and JavaScript:

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Excellent article.

      Author's profile photo Former Member
      Former Member

      Thanks for providing this. I'm really pleased to see Test Driven Design being used in a UI5 environment, which many classical developers are still coming to terms with, and will look forward to following your blogs.