![]() ![]() Wendy, representing a customer interacting with the web UI.Apisitt, responsible for setting up test data using the REST API.Our example scenario could have two actors, who we'll call: If it did, you would not be able to test if your system correctly implemented its access control mechanisms! In particular, Serenity/JS will not prevent you from writing scenarios where a "writer" tries to impersonate a "publisher"Īnd publish an article. a "writer" can write articles,īut only a "publisher" publishes articles), this is not a mechanism to prevent the actor from performing activities inconsistent with their role. While a "role" might imply the permissions a given actor has in the system they interact with (e.g. Some good examples of roles include "a doctor", "a trader", or "a writer". It should be interpreted as the role a given actor plays in the performance, Just like the five core elements of the Screenplay Pattern, the term "role" comes from the system metaphor of a stage performance. Questions, used to retrieve information from the system under test and the test execution environment.Tasks, used to model sequences of activities as meaningful steps of a business workflow in your domain.Interactions, which represent the low-level activities an actor can perform using a given interface.Abilities, that act as thin wrappers around any integration libraries required to interact with the system under test.Actors, who represent people and external systems interacting with the system under test.The five building blocks of the Screenplay Pattern are: What they need to do to accomplish their goals.Who the actors interacting with your system are.While interacting with the system under test.įollowing the Screenplay Pattern helps you capture: Helping you model each test scenario like a little screenplayĭescribing how the actors should go about performing their activities The Screenplay Pattern uses the system metaphor of a stage performance, ― Eric Evans, "Domain-Driven Design: Tackling Complexity in the Heart of Software" The five elements of the Screenplay Pattern #Serenity define interesting code#To communicate effectively, the code must be based on the same language used to write the requirements-the same language that the developers speak with each other and with domain experts. Modelling actor workflows using sequences of business-focused, reusable activities reduces code duplication, improves flexibility of your test code base,Īnd means that your team can quickly compose new test scenarios from existing steps.Focusing on actors and their goals makes it easy to correlate any test failures with the actual business impact.Expressing your test scenarios in your domain language makes them easier to understand and accessible to a wider audience.Interacting with your system need to perform in order to accomplish their goals.Īpplying this design principle to your automated tests has a number of positive implications: Automated acceptance tests should use your domain language to clearly express what activities the actors ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |