14 Executable specifications for existing systems with Serenity/JS

 

This chapter covers

  • Using Journey Mapping to identify and visualize high-value workflows and test scenarios
  • Using layered architecture and Serenity/JS to design scalable test automation systems

So far, you’ve learned how to use automated acceptance tests as a design tool that helps your team evolve a software system gradually, together with your growing understanding of the rules the system needs to implement and the business scenarios it needs to support. However, you might not always have the luxury of starting fresh on a greenfield project, and you could find yourself in a situation where you need to retrofit acceptance tests to an existing or partially existing system before you can use them to guide development of any new features.

To help you prepare for that, in this chapter we’ll pretend that most of the Flying High Airlines’ system has already been built without any acceptance test coverage. As is typically the case, our first task is to create a safety net of automated tests around the critical parts of the system to enable the development team to introduce improvements and reduce the risk of such improvements causing regressions, which would negatively affect the existing functionality.

14.1 Navigating an uncharted territory with Journey Mapping

14.1.1 Determine actors and goals to understand the business context

14.1.2 Determine what workflows support the goals of interest

14.1.3 Associate workflows with features

14.1.4 Establish a steel thread of scenarios that demonstrate the features

14.1.5 Determine verifiable consequences of each scenario

14.1.6 Using task analysis to understand the steps of each scenario

14.2 Designing scalable test automation systems

14.2.1 Using layered architecture to design scalable test automation systems

14.2.2 Using actors to link the layers of a test automation system

14.2.3 Using actors to describe personas

14.3 Capturing business context in the Specification layer

Summary