Pattern of report writing

The actor methods attemptsTo() and wasAbleTo() take a list of Task objects and successively call the performAs() method for each task. We use static builder methods such as () to prepare the Task objects before they are executed, and pass in any variables the task may need. This helps make the code read more fluently. In this simple case, we don’t need to do anything special, so the anEmptyTodoList() static method just returns an instance the StartWith class. The only thing we do need to do is to add some Serenity instrumentation to the instance using the () method, so that the task and underlying actions will appear in the Serenity reports:

Pattern of report writing

pattern of report writing

Media:

pattern of report writingpattern of report writingpattern of report writingpattern of report writing